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.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
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.
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.
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.
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
How many visitors per day? How big database? How much traffic per day? Can you give a llitle more details?
That's because you're using a more lightweight forum. IPboard, well, you know, doesn't work as well.
Can you elaborate what do you mean by "large forum"?
What software are you using?
Do you have any sort of caching enabled?
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
for what apache here?
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!
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.
Sorry to bump the thread but did you have any custom lighttpd configs?
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
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.
No I use default configuration.
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.
PHP Fast CGI or PHP-FPM??? Thanks too man
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.
Yep same here.
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/
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:
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.
Try nginx instead of Apache. Will use far less ram as well.
Configure opcache, run the tuning primer to get recommendations on how to optimize your MySQL config.
Why don't you just upgrade to a bigger plan, e.g. with 1GB RAM?
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...