High memory usage


#1

I’m running a site on two vps, one for mysql and one for webserver. The problem is on webserver i have cpu around 100/130 and the memory usage around 300/320. How is possible ? Do you think is possible know the memory usage in real time ? i have a image gallery site, do you think is possible a lot of images increasing memory usage ?
Thabks


#2

If you ssh into your server and run top you’ll see every process and what percentage of CPU it’s using.

Free unique IP and $67 off with code [color=#CC0000]LMIP67[/color] or use [color=#CC0000]LM97[/color] for $97 off. Click for other Dreamhost coupons / promo codes


#3

what’s type of command i should see ? I have 3/4 apache2 process with 2.8 or 3.3 memory usage, the CPU is around 0.3.

More big are my sites and more is the memory usage for the apache2 process ?


#4

i have about 200000k used without any instance of my user

1 root 15 0 1944 652 556 S 0.0 0.2 0:08.54 init
1372 root 15 0 18136 9.9m 5664 S 0.0 3.3 0:00.72 apache2-fffday-ht
1391 root 18 0 1616 480 420 S 0.0 0.2 0:00.00 inetd
1394 jabber 15 0 4356 2200 1532 S 0.0 0.7 0:00.02 jabberd
1397 jabber 23 0 4040 884 392 S 0.0 0.3 0:00.00 jabberd
1409 jabber 15 0 4452 1432 996 S 0.0 0.5 0:00.01 jabberd
1412 jabber 15 0 108m 2772 1596 S 0.0 0.9 0:02.25 jabberd-jit
1415 jabber 15 0 4716 1648 1232 S 0.0 0.5 0:00.00 jabberd
1418 jabber 19 0 4736 1408 1056 S 0.0 0.5 0:00.00 jabberd
1421 jabber 15 0 4348 1256 916 S 0.0 0.4 0:00.04 jabberd
1450 nobody 19 0 1792 460 380 S 0.0 0.1 0:00.00 oidentd
1550 root 18 0 3044 1168 992 S 0.0 0.4 0:00.07 master
1558 postfix 18 0 3084 1224 1016 S 0.0 0.4 0:00.07 qmgr
1559 root 18 0 3548 924 692 S 0.0 0.3 0:00.48 sshd
1570 nobody 18 0 2436 792 440 S 0.0 0.3 0:00.00 proftpd
1574 daemon 15 0 1768 388 308 S 0.0 0.1 0:00.00 atd


#5

Well, you really should try looking at it while your site is being hit. Looking at it when your server is idle won’t really give you a good idea about how much memory is being used by various parts of your sites.

Free unique IP and $67 off with code [color=#CC0000]LMIP67[/color] or use [color=#CC0000]LM97[/color] for $97 off. Click for other Dreamhost coupons / promo codes


#6

But when is created a new instance of apache2 ? Sometimes i see 2/3 instance other times 6/7.

and is not possible see all the active process ? Now seems appear randomly


#7

top will show you the top active processes use “ps aux” to get a listing of all current processes. You’ll also need to watch out for processes that are actually child processes which are sharing most of their code or data segment with their parent processes and also programs which are loading shared libraries which may be… shared with other programs, and thus not fully responsible for the memory used by these libraries.

Image processing software is a known memory hog, though. You should definitely check things out when you’re generating thumbnails, uploading new photos, and when you’re viewing photos at various sizes. You can run two or three browser windows at the same time and hit control-F5 to refresh without using the cache to maximize the requests to your site.

I’ve been considering getting a second non-PS plan for my Gallery site as it’s one of my personal, non-critical sites.

Free unique IP and $67 off with code [color=#CC0000]LMIP67[/color] or use [color=#CC0000]LM97[/color] for $97 off. Click for other Dreamhost coupons / promo codes


#8

BTW, this article explains advanced memory analysis under unix/linux in a very approachable way.

Note: It is not my blog, nor do I have any financial interest in it.

Free unique IP and $67 off with code [color=#CC0000]LMIP67[/color] or use [color=#CC0000]LM97[/color] for $97 off. Click for other Dreamhost coupons / promo codes