Memory usage on Ubuntu Desktop 12.04 64 bits
Hello,
I am running my ubuntu desktop 12.04 to host 1 site on it. The machine is good, but i have a little problem.
PC Specs:
CPU: MD FX-6200 /3.8G/X6/BOX AM3+
RAM: 8GB DDR III 1333Mhz
When i check my ram usage i got this:
Code:
total used free shared buffers cached
Mem: 7970 6907 1062 0 38 6039
-/+ buffers/cache: 830 7139
Swap: 8173 0 8173
and something the server use all 8 GB ram and the site stop work. Any ideas from where come the problem and i can't understand what is really memory usage Mem or +/-buffers/cache, because the difference is big.
Thanks !
Re: Memory usage on Ubuntu Desktop 12.04 64 bits
you have nearly 7 GB's free, install htop, it'll show you more clearly.
you subtract buffers and cache to find how much ram is free.
Re: Memory usage on Ubuntu Desktop 12.04 64 bits
Okay thanks, but then why the site stop work when the first line use all memory ? I restart apache and mysql server and the pc still use 6.5 GB ram ? Is there a way to increase it or from where can come the problem. Thanks !
Re: Memory usage on Ubuntu Desktop 12.04 64 bits
I doubt it's your ram, since you have a ton of free ram.
Check your logs to see if there are any clues in there (when they stop working)
(I'm just guessing at which logs might be useful, I am neither an apache or a mysql server expert and am just trying help you get some useful info in your thread)
Code:
tail /var/log/apache2/error.log
I'm not sure what mysql's log would be called but it should be somewhere under /var/log
Re: Memory usage on Ubuntu Desktop 12.04 64 bits
When you run the "free" command the second line shows you how much RAM is used and how much is free. You have 7GB of free memory, so your RAM isn't full. The problem with your web server is probably unrelated to memory.
Maybe you're getting a lot of connection attempts? Is it possible the server is still running and is just backed up and slow to respond?
Re: Memory usage on Ubuntu Desktop 12.04 64 bits
I don't think that the problem comes from apache or mysql I restart both and when i type:
free -m, the first line show used: 6500 free 1500. What is this and the second line show about 1 use and 7 free.
Thnaks !
Re: Memory usage on Ubuntu Desktop 12.04 64 bits
Maybe this helps you understand how it works: Help! Linux ate my RAM
And please, use code tags when posting code and results so formatting is maintained.
Re: Memory usage on Ubuntu Desktop 12.04 64 bits
Thanks, I read it, but i don't understand why the site stop work when the firs line use all my memory, but actually it use 1 gb ram of 8 gb.
Re: Memory usage on Ubuntu Desktop 12.04 64 bits
Neither do we ;) First of all it's totally not clear what you mean by 'stop work'. No access? Slow? Corrupted data? What type of site? Some static html pages? Dynamic content with a database behind it? Which database (mysql or something else)? Which webserver (apache or something else)? Have you coded your site yourself from scratch (not really applicable if it's a static site)?
What does top say? Any process that use extreme processing power? You can sort the processes by CPU usage by pressing capital P and by memory usage by pressing capital M.
Re: Memory usage on Ubuntu Desktop 12.04 64 bits
Quote:
Originally Posted by
Wim Sturkenboom
Neither do we ;) First of all it's totally not clear what you mean by 'stop work'. No access? Slow? Corrupted data? What type of site? Some static html pages? Dynamic content with a database behind it? Which database (mysql or something else)? Which webserver (apache or something else)? Have you coded your site yourself from scratch (not really applicable if it's a static site)?
What does top say? Any process that use extreme processing power? You can sort the processes by CPU usage by pressing capital P and by memory usage by pressing capital M.
What he said ^.
Also check the apache error log, like jerome mentioned. That will help you narrow down what it going on.