New on LowEndTalk? Please Register and read our Community Rules.
Wordpress & 32MB Of Ram.. -- Assistance?
Hi guys, I currently own a prometeus VPS with 128MB of ram, but. I'm using this as a test bench for my IPXCore, until that's back up and running.
I'm finding it rather hard to acheive a WP blog with less than 32MB of ram -- I got one running, with MySQL taking 15%, Apache taking 15% memory and using just under 100MB of ram.
Here's my PS AUX for anybody who might be able to help.
I have heard that NGINX might be a better option -- Opinion?
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.1 2028 168 ? Ss 01:17 0:00 init [2] root 2 0.0 0.0 0 0 ? S 01:17 0:00 [kthreadd/578] root 3 0.0 0.0 0 0 ? S 01:17 0:00 [khelper/578] root 461 0.0 0.6 9208 812 ? Ss 01:17 0:00 /usr/sbin/nmbd root 488 0.0 0.8 16556 1164 ? Ss 01:17 0:00 /usr/sbin/smbd root 489 0.0 0.0 8668 100 ? Ss 01:17 0:00 /usr/sbin/sasla root 492 0.0 0.0 8668 16 ? S 01:17 0:00 /usr/sbin/sasla root 496 0.0 0.0 5368 96 ? S 01:17 0:00 supervising sys root 497 0.0 1.3 6008 1776 ? Ss 01:17 0:01 /usr/sbin/syslo root 505 0.0 0.3 16556 416 ? S 01:17 0:00 /usr/sbin/smbd root 526 0.0 0.2 2084 300 ? Ss 01:17 0:00 /usr/sbin/dropb bind 553 0.0 1.0 48876 1388 ? Ssl 01:17 0:00 /usr/sbin/named root 580 0.0 0.1 2392 144 ? Ss 01:17 0:00 /usr/sbin/xinet root 592 0.0 0.4 2676 548 ? S 01:17 0:00 /bin/sh /usr/bi root 626 0.0 0.4 10600 544 ? Ss 01:17 0:01 sendmail: MTA: mysql 715 0.0 3.0 156040 4004 ? Sl 01:17 0:08 /usr/sbin/mysql root 716 0.0 0.0 1668 16 ? S 01:17 0:00 logger -t mysql root 851 0.0 0.7 36964 1036 ? Ss 01:17 0:01 /usr/sbin/apach www-data 861 0.1 15.2 54396 20048 ? S 01:17 0:55 /usr/sbin/apach root 880 0.0 0.2 2288 320 ? Ss 01:17 0:00 /usr/sbin/cron www-data 900 0.1 14.2 54372 18676 ? S 01:17 0:55 /usr/sbin/apach www-data 942 0.1 15.3 54396 20096 ? S 01:35 0:53 /usr/sbin/apach root 5503 2.1 0.8 2400 1116 ? Ss 14:29 0:00 /usr/sbin/dropb root 5504 0.0 1.2 2960 1604 pts/0 Ss 14:29 0:00 -bash root 5508 0.0 0.7 2348 932 pts/0 R+ 14:29 0:00 ps aux
And Free -m...
total used free shared buffers cached Mem: 128 79 48 0 0 23 -/+ buffers/cache: 55 72 Swap: 128 26 101
And HTOP
Comments
Give the output of free -m
Why do you need mysqld? Sqlite might be an option.
Also - you have samba running there??? Why? And why apache?
Daniel, pop on skype? -- Also, post updated to include info.
We'd need to see your my.cnf, nginx.conf and php.ini/php-fpm.conf files.
I have it running comfortably on a 128MB VPS (ignore the recent surge in 'other'... Just doing some testing)
use minstall first
Going to migrate to Nginx... Will post results :']
minstall will optimize memory usage. even also mysql
purge apache samba bind9 portmap
install nginx
and then tweak the mysql /etc/mysql/conf.d/lowend.cnf :
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K
default-storage-engine = MYISAM
skip-innodb
thread_concurrency = 2
You could get less memory if you use Openvz. But ofcourse using Minstall will lower your memory usage
Using OVZ ;'] and thanks, i'll take it into consideration. I tried the LeS -- Seemed to break for me; I had VirtualHosts working fine with Apache, how do I do such a thing with NGINX? I've never actually played with it, and I Was using A2ENSITE to setup the websites. Is it similar? :S
@dmmcintyre3 is the man to speak to about this.
He got WP running on a 16MB OpenVZ vps with vSwap.
What os do you use?
@dmmcintyre3 please post tutorial for wp
@BluBoy what script is that? Looks hot.
It can be done in 32 MB ram, but it is not the idle stuff that matters, but actually the visitors take RAM.
IMO 64 MB will be enough for 3-4 visitors without using much swap. Anything above 1 will make 32 go wild on abusing resources, with very careful tweaking maybe you can hold 2, perhaps 3 if they read slowly.
Any more tweaking than that is art and cant be really put into a tutorial :P
M
IMO 64 MB will be enough for 3-4 visitors without using much swap. Anything above 1 will make 32 go wild on abusing resources, with very careful tweaking maybe you can hold 2, perhaps 3 if they read slowly.
Any more tweaking than that is art and cant be really put into a tutorial :P
M
You could do more than that, sorta.
Presuming that the WordPress site is largely static, and you aren't posting much daily, you could set NGINX to cache everything (excluding the wp-admin folder) therefore reducing the PHP/MySQL requests dramatically.
If LowEndBox didn't have comments, for example, then that would work perfectly.
If we speak of concurrent 2-3 ppl at a time, then it cant be that static. Unless you disable comments or something.
M
Or if we used Disqus or something like FB Comments
Valid points -- However I was hoping for a comments section, but this could be acheived through DisQus or something similar. Posts would be made infrequently, mainly any "tech" shit i get involved in, VPS Reviews, etc.. -- I'd have Crayon Syntax hilightling for PHP; bash; etc.
So -- that's additional memory usage there.
In that case, ditch WordPress and go for something like Jekyll or Octopress.
Oh and use thttpd.
Oh and use thttpd.
I see your point
FlatPress looked appealing, or should i saw appaling? ;']
that seems insanely cool... it's even possible to export posts directly from emacs' org-mode... thanks for heads up
Ok, so I slapped a few changes on, used minstall for optimal, installed Wordpress, got it to using 38.5MB idle with me browsing from my home net..
This is literally a fresh install, minstall'd and wordpress slapped on with some Nginx config.
here's my new HTOP... Anybody feel like giving me some further optimization? I feel like I could lose fail2ban and go for something more lightweight, not sure though.. thoughts?
MySQL seems optimized as far as I can go, using it without INNODB and other bloat, used minstall to configure the optimization of it.
php-fpm: pool chris seems to be using the most out of anything, that's clearly the php service, right?
Yes, with Minstall, we serve the php file using php5-fpm
Could you share your mysql config?
I can't see how my MySQL config would help, since it's using minimal memory, is there any optimisation techniques for PHP5-FPM? @ErawanArifNugroho
Also.. My MySQL Config, @jcaleb
inside the conf.d ....
innodb.cnf
inside lowmem.cnf
inside mysqld_safe_syslog.cnf
So true
@Sleddog & @Maounique I got it idle at around 12MB, but as soon as somebody accesses the website, it jumps to 38MB and creeps to 50-66mb upon extra visitors..
@eastnoch : The PHP5-FPM is already optimized if we are using Minstall
I'm using it also for running my blog which running in a KVM vps from Prometeus.
@ErawanArifNugroho True, but there must be further methods to reduce it's usage.
@MrLadoodle had his running quite slim, can't remember how he did it tho.