Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Best route for hosting a large forum on a 512MB VPS
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Best route for hosting a large forum on a 512MB VPS

InternetInternet Member

What is the best configuration I can do for hosting a forum on a 512MB RAM VPS. I'm currently using Apache + Mysql on Centos 6 and it's literally eating all my ram. Any suggestions? Thanks

«1

Comments

  • AbdussamadAbdussamad Member
    edited May 2015

    What apache mpm are you using? what does httdp -M tell you? If it's prefork mpm then tune max clients. Usually people leave it to default of 150 clients simultaneously and they run out of RAM.

    You could also switch to nginx

    Basically we are flying blind here because you haven't told us anything at all about what's eating all your RAM :P Maybe you are not even running out of ram. Please visit linuxatemyram.com and tell us whether you really are running out of RAM.

  • WilliamWilliam Member

    Internet said: I'm currently using Apache + Mysql on Centos 6

    There is your problem.

  • Try using PHP-FPM and NGINX. Also, large forum + ads = only enough $ for a 512MB VPS? Try a Delimiter $10 2GB dedicated server.

    Thanked by 2MarkTurner MikePT
  • Which forum software are you running? Some caching may help.

  • @MarkTurner said:
    Which forum software are you running? Some caching may help.

    IP Board

  • Try Litespeed, I am not sure that the free one will help (depending on traffic). But that has helped a few people I know running busy IPboard, VBulletin sites:

    http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:litespeed:cache:ipboard

  • Use NGINX + MemCached to cache pages.

    Thanked by 1MikePT
  • I'm using lighttpd using around 97 Mb of Ram with Mysql and php. I'm hosting website, forum on A Domain and Subdomains. Forum have 4,026 posts in 860 threads and don't look like its slowing down. forum soft is Mybb

    root@test:~# free -m
    total used free shared buffers cached
    Mem: 128 97 30 0 0 19
    load average: 0.01, 0.03, 0.00

  • jvnadrjvnadr Member

    Internet said: What is the best configuration I can do for hosting a forum on a 512MB RAM VPS

    How many visitors per day? How big database? How much traffic per day? Can you give a llitle more details?

  • FlamesRunnerFlamesRunner Member
    edited May 2015

    @mlody1039 said:
    I'm using lighttpd using around 97 Mb of Ram with Mysql and php. I'm hosting website, forum on A Domain and Subdomains. Forum have 4,026 posts in 860 threads and don't look like its slowing down. forum soft is Mybb

    root@test:~# free -m
    total used free shared buffers cached
    Mem: 128 97 30 0 0 19
    load average: 0.01, 0.03, 0.00

    That's because you're using a more lightweight forum. IPboard, well, you know, doesn't work as well.

  • ClouviderClouvider Member, Patron Provider

    Can you elaborate what do you mean by "large forum"?
    What software are you using?
    Do you have any sort of caching enabled?

  • @MarkTurner said:
    Try Litespeed, I am not sure that the free one will help (depending on traffic). But that has helped a few people I know running busy IPboard, VBulletin sites:

    http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:litespeed:cache:ipboard

    When I had this problem back in the day with my IP.Board forum I got two servers from LEB with 2GB of ram to offload MySQL, one for the webserver running nginx and php-fpm and some php cache extension both with fine tuned configs.

  • We would recommend with nginx + Apache + php5-fpm + mysql5

  • sepeisepei Member

    @AlphaNinevps_com said:
    We would recommend with nginx + Apache + php5-fpm + mysql5

    for what apache here?

    Thanked by 2Abdussamad Cakey
  • nginx + nginx fastcgi cache + php-fpm + MySQL (and if you had more ram I would say memcached but if your trying to stay in 512mb ram I don't think I would mess with it). Nginx and php-fpm have a much smaller footprint than Apache. Fastcgi cache should help take load off the MySQL server for a lot of the php requests, thus speeding up the site and using less resources overall for MySQL (though I am not sure if there would be any weird cache issues with IPB, would have to try it out and see).

    Another fun thing to look at, though I am not sure its compatibility with IPB, is HHVM which actually compiles your php code using a JIT compiler and speeds up load and lowers resource usage. As I said thought, I haven't tested it with IPB and there are some weird quirks with some things in PHP still.

    my 2 cents.

    Cheers!

  • jcalebjcaleb Member

    I recommend just using a server with higher specs. It's not worth the time saving few $$$ just to squeeze things. You will outgrow them anyway and you will want to tune later for better performance and upgrade your server.

    Initially, throw 1-1.5GB RAM to your MySQL and 1Gb to PHP/Nginx. So maybe a 4GB KVM will be good.

  • Why a KVM?
    He's just hosting a website. OVZ should do just fine.
    @OP try VPSDime.com - they have some good pricing.

  • Expect when you recieve a DDoS attack.

    If your service receives an attack that is higher than 10Gbit or 2 smaller attacks, VPSDime may stop the service without a refund. VPSDime may or may not provide a backup of the data to the customer based on the circumstances. The customer is fully responsible having an offsite backup of their data.

  • @mlody1039 said:
    I'm using lighttpd using around 97 Mb of Ram with Mysql and php. I'm hosting website, forum on A Domain and Subdomains. Forum have 4,026 posts in 860 threads and don't look like its slowing down. forum soft is Mybb

    root@test:~# free -m
    total used free shared buffers cached
    Mem: 128 97 30 0 0 19
    load average: 0.01, 0.03, 0.00

    @mlody1039 said:
    I'm using lighttpd using around 97 Mb of Ram with Mysql and php. I'm hosting website, forum on A Domain and Subdomains. Forum have 4,026 posts in 860 threads and don't look like its slowing down. forum soft is Mybb

    root@test:~# free -m
    total used free shared buffers cached
    Mem: 128 97 30 0 0 19
    load average: 0.01, 0.03, 0.00
    '

    Sorry to bump the thread but did you have any custom lighttpd configs?

  • hostnoobhostnoob Member
    edited June 2015

    @Internet said:

    How many members/posts? How many pageviews?

    I'm running an IP.Board forum with 7,000+ users and 300,000+ posts with a couple mods enabled.

    I host it on a 512MB VPS with lighttpd, PHP and MySQL and I never have performance issues or out of memory errors

    13:49:34 up 302 days,  8:52,  1 user,  load average: 0.58, 0.88, 0.86
    
                 total       used       free     shared    buffers     cached
    Mem:           512        311        200          0          0          0
    -/+ buffers/cache:        311        200
    Swap:            0          0          0
    

    I kept all default config files, but I used the my-large.cnf file from /usr/share/doc/mysql-server-5.5/examples/

    Edit: it's behind Cloudflare also, which may help.

  • @Internet said:

    No I use default configuration.

  • rm_rm_ IPv6 Advocate, Veteran

    Really the Apache project should just self-close voluntarily already. At this point they are creating more harm than good, by making people unknowingly choose their server instead of downright better products such as Nginx or Lighttpd.

    Thanked by 1alexvolk
  • @mlody1039 said:
    No I use default configuration.

    PHP Fast CGI or PHP-FPM??? Thanks too man

  • @rm_ said:
    Really the Apache project should just self-close voluntarily already. At this point they are creating more harm than good, by making people unknowingly choose their server instead of downright better products such as Nginx or Lighttpd.

    Some people swear by using Apache for dynamic requests and Nginx/Lighttpd for everything else though. Personally I just use Lighttpd for everything, I find it much easier to configure than Nginx, and performance is still great.

  • rm_rm_ IPv6 Advocate, Veteran

    hostnoob said: Personally I just use Lighttpd for everything, I find it much easier to configure than Nginx, and performance is still great.

    Yep same here.

  • @Internet said:

    php5-cgi

    Well I have made tutorial for this on haphost just basic set up
    http://forum.haphost.com/index.php?/topic/34-ubuntu-debian-lighttpd-with-php5-mysql-phpmyadmin/

  • icryicry Member

    I am using Nginx-HHVM Setup with No Caching on my Website :)
    Really Great Performance Improvement.
    For VPS use Runabove only 2.5$/m for 2GB Ram KVM 2GBPS port
    For 6 Months free Runabove VPS, Use the below link
    http://www.99blogger.com/free-windows-vps-for-6-months-25-month-after-that-better-than-digital-ocean/

  • My ideas I got about that:

    1. Why do you use CentOS and not something light like Debian 6 or 7? It'll use far less ram. I once read that and it's kinda correct: CentOS is the Windows between Linux distros.

    2. Try nginx instead of Apache. Will use far less ram as well.

    3. Configure opcache, run the tuning primer to get recommendations on how to optimize your MySQL config.

    4. Why don't you just upgrade to a bigger plan, e.g. with 1GB RAM?

  • @nexusrain said:
    My ideas I got about that:

    1. Why do you use CentOS and not something light like Debian 6 or 7? It'll use far less ram. I once read that and it's kinda correct: CentOS is the Windows between Linux distros.

    Ummm no? The only reason CentOS seems to use more memory than Debian is because it comes with more stuff installed out of the box. Use a minimal template or remove the unwanted programs like you're supposed to. The only real reason you should use Debian over CentOS is because packages are more recent versions on Debian but for people who prefer to use CentOS this isn't a problem since it's easy to get the most recent version of any software.

  • The only reason CentOS is so popular is probably because cPanel doesn't support Debian. Other than that I don't see how you can claim CentOS is the better distro...

Sign In or Register to comment.