LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 01-03-2013, 03:11 PM   #1
pratkal9
LQ Newbie
 
Registered: Oct 2012
Posts: 6

Rep: Reputation: Disabled
Decreased performance and way too aggressive swaping by cloud linux cs6.3


Hi guys

before any 1 comment based on topic name

I am well aware of fact linux Only use swap when required and got is a great addon

but here is the deal

for past few weeks

i got a server to host few of my websites and each time i enabled swap server start swapping everything from ram

in metter of min my swap usage is from 0 - 2GB ( total 4GB )

but this result in very bad performance

i.e Load as high as 10-20

but when i disable swap and run the same server same amount of process and ram usage i see load droped down to 5-8 ( note im running rsync to creating backup when load was 5-8 )

what can i do to fix this issue

what you ppl believe is causing the issue?

value of iostat


avg-cpu: %user %nice %system %iowait %steal %idle
7.51 1.01 3.50 27.56 0.00 60.42

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 175.56 2003.24 3115.81 548390216 852956424
sdb 28.09 1195.81 1749.50 327355808 478927752

please help

thanks in advance
 
Old 01-03-2013, 03:19 PM   #2
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 1,506

Rep: Reputation: 233Reputation: 233Reputation: 233
Swap space is virtual RAM, so what's using up the RAM?

Java?
/tmp using ramfs?
encryption?

Without swap when you run out of RAM, applications just start getting nuked, which is probably not desireable. But neither is using swap as it's a hefty performance hit.
 
Old 01-03-2013, 03:25 PM   #3
pratkal9
LQ Newbie
 
Registered: Oct 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
php is using the most ram / apache

my query is could it be a hardware / kernal issue?

Last edited by pratkal9; 01-03-2013 at 03:35 PM.
 
Old 01-03-2013, 04:00 PM   #4
pratkal9
LQ Newbie
 
Registered: Oct 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
ok can you tell me if i can create a new swap device on second drive its mostly free so i believe it can do better for swap
 
Old 01-03-2013, 04:04 PM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: Slackware®
Posts: 11,046
Blog Entries: 1

Rep: Reputation: 1371Reputation: 1371Reputation: 1371Reputation: 1371Reputation: 1371Reputation: 1371Reputation: 1371Reputation: 1371Reputation: 1371Reputation: 1371
Moderator Response

Moved: This thread is more suitable in <Linux-Server> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 01-03-2013, 06:36 PM   #6
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 1,506

Rep: Reputation: 233Reputation: 233Reputation: 233
Yes you can create a swap partition on another drive. You can even create a file and format the file with the swap format and mount the file.

# mkswap -v 1 (file or partition)
# swapon -p -1 (file or partition)
(you can use dd to create a file, or typical partitioning methods)
(a file is likely less efficient, but it's the least risky to make and use as needed)

# swapon -s
(shows usage stats)

# swapoff (file or partition)
(like umount but for swap)

You should probably find out what exactly is eating your RAM up. And address that to remove the need for the swap. Ideally swap should be it's own device for maximum performance. If not, then somewhere in the middle of the disc to ensure that the read heads are at worse 50% away from using it.
 
  


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
I could't install adobe dreamweaver cs6 using wine....? vigneshwaran Linux - Newbie 2 07-13-2012 11:31 AM
LXer: VMware: Cloud Foundry PaaS will be the 'Linux' of the cloud LXer Syndicated Linux News 0 04-12-2012 02:30 AM
my pc performace decreased drastically surya_prakash Linux - Newbie 6 11-14-2008 09:37 AM


All times are GMT -5. The time now is 10:20 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration