homepage Welcome to WebmasterWorld Guest from 23.23.12.202
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Heavy swapping on lightly trafficked website
rajatgarg

10+ Year Member



 
Msg#: 3959305 posted 12:59 am on Jul 25, 2009 (gmt 0)

Hi,

I have a server that gets <200 visits/day (including bot - just launched site) and is heavily swapping. It has Apache+Passenger+ruby+rails config -

top - 22:43:11 up 1:06, 2 users, load average: 9.52, 10.45, 10.07
Tasks: 72 total, 1 running, 71 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.1%us, 1.2%sy, 0.0%ni, 73.0%id, 24.9%wa, 0.0%hi, 0.0%si, 0.9%st
Mem: 1048796k total, 1039216k used, 9580k free, 964k buffers
Swap: 2097144k total, 2096868k used, 276k free, 43848k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
132 root 15 -5 0 0 0 S 7 0.0 5:08.97 kswapd0
4379 mysql 20 0 222m 4656 612 S 5 0.4 1:20.33 mysqld
4438 rajat 20 0 204m 33m 100 D 1 3.3 0:31.62 ruby1.8
4599 rajat 20 0 18860 760 476 R 1 0.1 0:00.30 top
4125 rajat 20 0 946m 138m 68 D 0 13.6 4:53.01 ruby1.8
4164 rajat 20 0 618m 21m 68 D 0 2.1 3:05.31 ruby1.8
4296 rajat 20 0 201m 37m 320 D 0 3.7 1:10.60 ruby1.8

I have no clue where to even start looking for a solution. Any ideas?

Is the culprit Apache or Passenger?

Memory consumption automatically grows after reboot in 15 minutes from 5-10% to all physical memory and then all swap memory.

Please help.

UPDATE after 10 minutes -
------------------------------------
top - 22:56:44 up 1:19, 2 users, load average: 7.60, 8.16, 9.03
Tasks: 78 total, 1 running, 77 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.7%us, 4.5%sy, 0.0%ni, 67.4%id, 26.5%wa, 0.0%hi, 0.0%si, 1.0%st
Mem: 1048796k total, 1031148k used, 17648k free, 144k buffers
Swap: 2097144k total, 2097108k used, 36k free, 55968k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4379 mysql 20 0 222m 5568 396 S 29 0.5 1:37.35 mysqld
132 root 15 -5 0 0 0 D 10 0.0 5:49.62 kswapd0
4125 rajat 20 0 946m 242m 68 D 1 23.6 4:55.17 ruby1.8
4164 rajat 20 0 618m 64m 88 D 1 6.3 3:07.33 ruby1.8
4444 rajat 20 0 305m 114m 428 D 1 11.1 0:34.43 ruby1.8
4157 rajat 20 0 624m 53m 68 D 1 5.3 3:39.54 ruby1.8
4438 rajat 20 0 204m 62m 112 D 0 6.1 0:33.41 ruby1.8
4458 rajat 20 0 661m 213m 476 D 0 20.9 1:35.59 ruby1.8

 

debajit kataki

5+ Year Member



 
Msg#: 3959305 posted 6:12 am on Jul 30, 2009 (gmt 0)

Seems like something is taking your memory in to heap.

Since all processes looks in "S" state. also 55% of your memory is memory is cached.

Resource control and optimization options section may be helpful [modrails.com...]

You may also turned off global queuing if it on since your traffic is less..

along with top command like 'passenger-status' might be helpful.

~DK

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved