LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-18-2011, 07:52 PM   #1
Ook
Member
 
Registered: Apr 2004
Location: Hell, Arizona (July - 118 degrees)
Distribution: Slackware 14.2 soon to be Slackware 15
Posts: 699

Rep: Reputation: 131Reputation: 131
Performance problems during disk i/o


Slackware 64 bit current.
8GB ram
Two (2) Western Digital Black edition 1 TB SATA III 7200 RPM drives
3.1.1 kernel
Phenom 3400MHz six core cpu

When I have a process that is maxing out the hard drives, such as a file copy process, the entire system becomes sluggish and responds poorly. If I have a 20GB file, such as a large database or a virtual machine disk image, and I want to copy it from one drive to another, the system becomes very sluggish and responds poorly during the file copy.

Are there ways to optimize this system such that the system can still be usable even when disk i/o is maxed out, and maybe to optimize disk speed?
 
Old 11-19-2011, 12:57 AM   #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
Use the ionice command on the copy to perform the I/O at lower priority than foreground processes. For example:

Code:
ionice -c3 cp somefile /path/destination
The ionice command is for I/O as the nice command is for CPU. They can be combined as well:

Code:
nice -n19 ionice -c3 cp somefile /path/destination
 
Old 11-19-2011, 02:24 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
That's not really a (long-term) viable solution.
I'd be surprised if Pat has pushed a 3.1.1 kernel out the door, so did you do it yourself ?. Might need some closer inspection of options selected. I have a couple of that level kernel lying around, I'll do some quick tests.
Maybe have a look at latencytop.
 
Old 11-19-2011, 04:27 AM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
It does indeed depend on a lot of things, so if you could post your .config or try and see if it still happens with the generic kernel, it would help.

In many cases the I/O scheduler does have an impact on it, so changing that may help. You can change it dynamically by echoing the name of the scheduler into '/sys/block/sda/queue/scheduler'. Change 'sda' to whatever your disk is.

What filesystem are you using ?
 
Old 11-19-2011, 09:23 AM   #5
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 497

Rep: Reputation: 119Reputation: 119
Since you build your own kernel I would always recommend using a better cpu scheduler (BFS) and a better IO scheduler (BFQ). If that doesn't improve interactivity sufficiently you can help the system along by following macemoneta's advice. For instance, all my xterm sessions are automatically started in SCHED_IDLEPRIO and with ionice level 3. Whatever I do in an xterm session (using all virtual cores and all disks) has no noticeable effect on my desktop interactivity.

http://ck.kolivas.org/patches/3.0/3.1/3.1.0-ck2/
http://algo.ing.unimo.it/people/paol...es/3.1.0-v3r1/

Having said all that, if your copy process is a regular occurrence you might want to optimize the spindle layout by putting the system on a third disk or even a small SSD.
 
Old 11-19-2011, 11:02 AM   #6
Ook
Member
 
Registered: Apr 2004
Location: Hell, Arizona (July - 118 degrees)
Distribution: Slackware 14.2 soon to be Slackware 15
Posts: 699

Original Poster
Rep: Reputation: 131Reputation: 131
Quote:
Originally Posted by syg00 View Post
That's not really a (long-term) viable solution.
I'd be surprised if Pat has pushed a 3.1.1 kernel out the door, so did you do it yourself ?. Might need some closer inspection of options selected. I have a couple of that level kernel lying around, I'll do some quick tests.
Maybe have a look at latencytop.
3.1.1 is on kernel.org right now, and it came out just this last week.
 
Old 11-20-2011, 08:21 AM   #7
EdGr
Member
 
Registered: Dec 2010
Location: California, USA
Distribution: I run my own OS
Posts: 998

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
It is normal for the kernel to swap out processes to re-allocate the memory for disk caching. If you don't want the kernel to do this, lower the value in

/proc/sys/vm/swappiness

or set it to zero.
Ed
 
Old 11-24-2011, 06:36 AM   #8
markseger
Member
 
Registered: Jul 2003
Posts: 244

Rep: Reputation: 26
What specifically is your system doing when you say it's sluggish? Is the CPU pinned? Running out of memory and swapping? Are you trying to do something that is competing for the busy disk(s)? If you don't measure it you won't know what the problem really is.
-mark
 
Old 11-29-2011, 08:18 PM   #9
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519

Rep: Reputation: 63
I have one of these hard drives mentioned by the OP.

I only see slugishness when I use KDE to copy/paste large files. If I use midnight commander (my default file manager) I don't have this issue.

I'm talking in reference to slack 13.37 fwiw.
 
  


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
Hard disk performance skoinga Linux - Server 1 09-20-2011 01:38 PM
Debugging Disk Performance bubblenut Linux - Server 2 10-05-2010 05:24 AM
Disk performance problem veli.linux Linux - Hardware 3 02-25-2010 05:21 PM
Disk Encryption vs. Performance CoderMan Linux - Server 1 01-29-2010 07:12 PM
Disk performance - is that true ? czezz Solaris / OpenSolaris 3 02-20-2009 06:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:44 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