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
mysql seems ok. can you run ps_mem.py (www.pixelbeat.org/scripts/ps_mem.py). this will show how much they really eat for each software.
edit: i believe its php5-fpm eating ram. try decrease memory_limit in php config file.
@jcaleb
After setting memory limit to 16 mb and restarting... (was 128)
If you want to run in 32MB first thing you do is get rid of all non-esential services. So get rid of fail2ban and ntpd (ntpd is no use on an OpenVz box anyway), and anything else that's hiding out of sight in that htop pic
Replace sshd with dropbear.
Squeeze mysql even more in that lowmem.cnf, e.g.,
Performance will suffer but that's the price you have to pay.
You have two php-fpm pools: 'chris' and 'www-data'. If 'chris' is serving your website, disable the 'www-data' pool.
The memory size of the 'chris' php-fpm pool is determined by the size of the PHP scripts running there -- Wordpress. So disable any non-essential features/addons in Wordpress to (try to) slim it down. Restart php-fpm to see if there's difference.
At the end of the day you'll have to face the fact the 32MB is too little to run a production Wordpress site. Overall, the system mods you make to get it running will negatively affect site performance and vistor experience. The answer is a bigger VPS... or a smaller blog
try make pm static and pm.start_servers = 1 in php config
and also make way to remove www-data pool
@BluBoy: What graphing system is that?
@eastonch: is this OpenVZ? If so, running ntpd won't do much, since containers aren't allowed to set their own times; instead, they inherit the host node's time.
PHP-cgi will use less RAM them PHP-fpm
It's just RRDTool. I have been playing around with it recently and don't mind the result
(If you look under the "THRIFTYDEVIL MONITORING" sidebar section on my blog, there are a few other ones I have been trying out).
https://www.thriftydevil.com.au/
Ok, removed some MySQL stuffs, disabled the second pool from the /etc/php5/fpm/pool.d/www-data
But now I have this...
Why do i have two pools?
http://screensnapr.com/e/Yhddf0.png
Here's my config file for "chriseaston.info" in the pool.d
http://screensnapr.com/e/MWvwxF.png
Thanks.
Ok, so I gave up on Wordpress, being that MySQL is always going to be a memory chomper...
FlatPress does everything I need, and it runs it at 17MB, after removal of MySQL.
Since there's not as much to load, except static pages, the entire PHP-FPM takes much less too.
Not two pools, two PHP processes (in the chris pool). With
pm = dynamic
PHP will spawn additional processes to handle traffic, up to the maximum set bypm.max-children
.Static was generating much more processes... Is this normal?
PHP with 128MB or 96MB in the config is ok for wordpress. Just use the ondemand scheduler to free some memory if gets idle. And limit the max children.
If your server never gets idle, then better to stick with the dynamic, as @sleddog says
@Yomero -- I had it running fine, it was just using more than 32MB -- I wanted to limit it as much as possible to install a WP Blog on my 32Mb IPX box :']
I haven't looked at Flatpress for ages. Just googled it now and for flatpress.org I see "This site may be compromised"...?
https://www.google.com/search?q=FlatPress
But is a KVM right? Already uses some RAM for the kernel and so.
Also, you can periodically purge some hidden caches, google for "drop_caches" and use the value 3.
it's not a KVM :'] @Sleddog -- I noticed that too, doesnt pop up when visiting.
Drop_Cache's wasnt allowed on OVZ, well atleast, this box :S
Also, you can periodically purge some hidden caches, google for "drop_caches" and use the value 3.
IPX is OpenVz. For KVM, don't do "drop_caches", it kills the benefit of caching. Better to increase /proc/sys/vm/vfs_cache_pressure, which will cause the kernel to be more agressive in reclaiming memory from cache-usage when more memory is requested.
I will try it when I got my 32mb server back XD
People have mentioned that using PHP_CGI would be better than FPM. Not sure
Yes, I know. I mean, the current server in question.
Interesting. Because the freaking kernel really uses that memory =/
Try:
vm.swappiness = 0
vm.vfs_cache_pressure = 200
That may be overkill :P
Personally I use "5"
I will check about the other value. Ty.
vm.swappiness = 0 doesn't disable swapping, it just says, "don't do it unless you bloody well have to"
Newer kernels (3.x) seem to be more swap-happy....
Agree. But I wonder what values may start to compromise performance