LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-30-2006, 03:32 PM   #1
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,056

Rep: Reputation: 78
How much swap usage is too much?


I upgraded my server to 768 MB of RAM from 512 a while back and it really helped performance. I recently checked the memory usage with 'free' and the swap file seems to be creeping up again. How much swap usage is too much?

Code:
[root@myDOMAIN root]# free
             total       used       free     shared    buffers     cached
Mem:        765520     738536      26984          0      96092     319552
-/+ buffers/cache:     322892     442628
Swap:      1052248     103112     949136
 
Old 11-30-2006, 03:48 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
The free display says that (minus buffers and cache) you have 442628k free memory, while you are using 103112k of swap. In other words, you could turn off swap and still have plenty of free memory. When this equation results in a less than zero value, you are using too much swap (you need more memory).

The usage of swap is generally a good thing - memory that is not used is moved out of RAM, making more available to the system/applications. Swap only becomes a problem if pages are moving in/out rapidly, which only occurs if there is too little RAM (a condition called thrashing). When thrashing, the system will slow to a crawl. If you're not experiencing that problem, your swap usage is OK.
 
Old 11-30-2006, 03:56 PM   #3
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,056

Original Poster
Rep: Reputation: 78
THANKS.

At the moment, my server is not thrashing. Performance is fine. However, Nov 9 - 14th it experienced a HUGE surge in traffic. I'm wondering if there's any way in retrospect to determine if it was slow during the surge.
 
Old 11-30-2006, 04:48 PM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Well, if you are running any servers that limit their operation based on load level (like sendmail), your historical logs (/var/log/mail/maillog* in the case of sendmail) will show messages from the servers delineating the period(s). Aside from that, unless you are recording the data yourself, there's no historical information normally kept by the system.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
swap usage pingvina Linux - Software 4 02-24-2006 12:52 PM
Memory / Swap Usage RoaCh Of DisCor Linux - Newbie 16 05-19-2005 02:45 PM
Swap Usage ComputerErik Slackware 3 05-06-2005 02:33 PM
RAM/SWAP usage ganja_guru Linux - Software 13 12-29-2004 03:17 AM
memory/swap usage koy Linux - Newbie 2 05-18-2004 11:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration