Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Possible Duplicate:
Server refuses to use swap partition

I am using Linux with Koloxo panel for site management. My database server went down, and I think it happened because of a lack of memory. This is even though the machine has 8GB memory and there aren't many users on the system (maybe about 20 to 50 users maximum at any given time). One thing I see in process is that one apache process is consuming round about 325MB of memory.

Output of process

Is it normal for the processes to consume this much memory? If not, how can I set reduce the memory consumption per user to a normal level?

share|improve this question

marked as duplicate by voretaq7 Aug 25 '12 at 2:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
The 360MB per Apache process are likely mostly shared between all processes. Please go to a shell and give us the output of free -m to determine how much memory you really use. Also, if the MySQL server goes down, it will create some kind of log entries that might tell you why this is happening. Please look up these log entries and also add them to your question. As it stands, we can't help you because you don't tell anything relevant. –  Sven Feb 28 '12 at 16:23
    
Virtual memory is not a scarce resource. If you ran out of physical memory, you should be analyzing physical memory consumption. –  David Schwartz Feb 28 '12 at 16:27
    
memory link apniworld.com/freem.png –  realcoder Feb 28 '12 at 17:00
1  
120222 19:39:31 [Note] /usr/libexec/mysqld: Normal shutdown 120222 19:39:31 [Note] /usr/libexec/mysqld: Shutdown complete ... your issues aren't memory related if that's a normal shutdown. I think you may need to have somebody actually take a look at your machine. –  Jeff Ferland Feb 28 '12 at 17:53
2  
Please don't waste our time telling us you think it's because of a lack of memory. Check your logs and they should tell you why the database service went down. If they don't then you need to increase the logging level till it does tell you what you need to know. Guessing about this stuff is a one-way road to disaster. –  John Gardeniers Feb 28 '12 at 20:40

1 Answer 1

See Server refuses to use swap partition for some details on memory usage and how you may be mis-interpreting usage.

Here's more info I grabbed from an idle test system:

#snippet from running `top`
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
19545 www-data  20   0  148m 3744  264 S    0  0.1   0:00.00 apache2
19546 www-data  20   0  148m 3696  244 S    0  0.1   0:00.00 apache2
19547 www-data  20   0  148m 3696  244 S    0  0.1   0:00.00 apache2
19548 www-data  20   0  148m 3696  244 S    0  0.1   0:00.00 apache2
19549 www-data  20   0  148m 3696  244 S    0  0.1   0:00.00 apache2
22396 www-data  20   0  148m 3660  204 S    0  0.1   0:00.00 apache2

You're notice they all show 148MB of usage much like your processes all show 325MB of memory. That's virtual memory, though. The real number to watch here is RES -- resident memory. Each process is actually using about 4MB of space. Notice that %MEM is reported as .1% on this 4GB box.

In short, things are probably fine and you need to use better tools to investigate than what that control panel is providing you with.

share|improve this answer
    
I don't know server just start responding late and become busy and after few time database server dead this happened all the time why ? i have given the details if need any other tell me thanks –  realcoder Feb 28 '12 at 17:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.