LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-19-2007, 09:41 PM   #1
jerryghb
LQ Newbie
 
Registered: Apr 2007
Posts: 3

Rep: Reputation: 0
Swap not being used


Hello LQ members,
I am having an issue with a server, no swap is being used causing high server load which usualy causes the server to be non responsive.
Here is some outputs:
#swapon -s
Filename Type Size Used Priority
/dev/hda2 partition 2096472 0 -1

# free -mt
total used free shared buffers cached
Mem: 2025 656 1369 0 33 187
-/+ buffers/cache: 435 1590
Swap: 2047 0 2047

I have other servers in which do not have much activity but still uses some swap.
I had an issue with highload before and it was the swap.
 
Old 04-19-2007, 10:19 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 75
Check your swappiness:
Code:
# sysctl vm.swappiness
0 (Oh noes! Teh swappiness is gone!)
# sysctl vm.swappiness=60 (choose a value between 0 and 100)
 
Old 04-19-2007, 11:00 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,839

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
@osor: lots of servers still run 2.4

@jerryghb: what do you mean by "high server load" ???. The load average numbers, high %CPU, something else ???.
 
Old 04-20-2007, 03:56 AM   #4
jerryghb
LQ Newbie
 
Registered: Apr 2007
Posts: 3

Original Poster
Rep: Reputation: 0
The load usually appears to be over 10 when it used to be normally below 1. There is no changes other then swap
 
Old 04-20-2007, 08:47 AM   #5
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 75
Quote:
Originally Posted by syg00
@osor: lots of servers still run 2.4
Point taken. It might have been beneficial if the OP would enlighten us on his specifics (i.e., distro).
 
Old 04-20-2007, 10:27 AM   #6
jerryghb
LQ Newbie
 
Registered: Apr 2007
Posts: 3

Original Poster
Rep: Reputation: 0
which valuw do I use
 
Old 04-20-2007, 11:04 AM   #7
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 75
Quote:
Originally Posted by jerryghb
which valuw do I use
Experiment until you are satisfied… If you want to force aggressive swapping, try 100. If you feel it is too aggressive decrease the value. Lather, rinse, repeat.
 
Old 04-20-2007, 05:44 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,839

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
With that amount of free memory, fiddling with swappiness is very unlikly to help.
High load values mean either too many tasks queued for for the CPU, or too many queued for I/O - usually the latter.

Look for what's queued, and then why. Too much work on the machine, bad application config, looping scripts, too much I/O to same disc/channel ... ??? who knows. Only you can determine that.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how much swap space is needed; how to increase swap space? johnpaulodonnell Linux - Newbie 5 03-23-2007 04:20 AM
Need Help Increasing Swap by creating a swap file froggo Red Hat 3 06-13-2006 09:04 AM
Linux swap / solaris not appearing as swap in Ubuntu? Erik_the_Red Linux - Newbie 1 07-30-2005 01:57 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 02:23 AM
Difference between Swap Virtrual memory and Swap Parition Nappa Slackware 4 11-27-2003 08:58 PM


All times are GMT -5. The time now is 04:23 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration