Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOWTO] Fun with io priorities aka ionice
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Cinquero
Apprentice
Apprentice


Joined: 24 Jun 2004
Posts: 249

PostPosted: Mon Oct 02, 2006 11:17 am    Post subject: Reply with quote

bludger wrote:
...

The problems occurred with kernel 2.6.16.29. I'm now using 2.6.18 (CFQ again because without it it is even worse on my desktop because I regularly create checksums of quite a few GB of data in the background), and, because there were significant changes to the CFQ scheduler code, I did test it again: download via NFS and du -sh /usr /var as root. And just as I started to write this message, firefox did not get any read access any more until I terminated the du process...
Back to top
View user's profile Send private message
MaratIK
n00b
n00b


Joined: 02 Apr 2003
Posts: 20
Location: Moscow, Russia

PostPosted: Mon Oct 02, 2006 12:29 pm    Post subject: Re: ebuild Reply with quote

bludger wrote:
MaratIK1 wrote:
Request for ebuild added:
https://bugs.gentoo.org/show_bug.cgi?id=148519
According to this link, ionice is included in schedutils 1.5.0, which appears to be already in portage. Has anyone tried this out?


Ugly. W/o ionice.patch :?
Back to top
View user's profile Send private message
Cinquero
Apprentice
Apprentice


Joined: 24 Jun 2004
Posts: 249

PostPosted: Thu Oct 05, 2006 2:14 pm    Post subject: Reply with quote

Ok, here is a screenshot of the problem that I think is due to CFQ:

https://stier.dynu.com/~moinmoin/MarksWiki/ScreenShots/200610?webnail=scheduler-insanity&action=show

All three avidemux2 processes have the same ionice priority (default, no ionice command used). However, the one with the lowest nice level (4) has the lowest CPU consumption for quite some time. I'm processing raw video data here (on an external USB2 disk, and we know that USB2 disks are rather limited by the USB2 protocol). That problems resembles exactly the one I have with "rm -rf /var/tmp/ccache" blocking firefox/desktop IO etc.
Back to top
View user's profile Send private message
boniek
Guru
Guru


Joined: 26 Mar 2005
Posts: 373

PostPosted: Sat Feb 10, 2007 10:12 pm    Post subject: Reply with quote

Con Kolivas wrote:
CFQ has builtin ionice support which is automatically linked to nice level
unless you explicitly set ionice separately.(...) The ionice support is for reads only. Due to the complex
path writes take to get to the io scheduler there is no ionice support for
writes yes so they are all treated equally. Some work is being done in that
area but nothing is concrete yet. Watch this space.

Pretty important details about ionice from guru himself plus interesting link as a bonus: http://ckrm.sourceforge.net/
_________________
[HOWTO]New freetype subpixel font rendering for lcd monitors
Back to top
View user's profile Send private message
rich0
Developer
Developer


Joined: 15 Sep 2002
Posts: 161

PostPosted: Mon May 21, 2007 5:17 pm    Post subject: ionice and raid Reply with quote

I've been using ionice for a few months now - it almost completely eliminated the IOBOUND problems I was having with my mythtv backend. I run the backend as -c1 and my writes are essentially guaranteed to get to disk before the buffer blocks. Likewise I can run emerge and other intensive tasks as -c3.

However, I recently started moving most of my data to a software raid device (running under lvm2). I don't think the kernel raid drivers pay any attention to ioniceness. I was having tons of IOBOUND errors on myth while doing disk-intensive operations like large copies. Doing an emerge --sync or eix update also killed whatever was recording at the time.

Has anybody used ionice with linux software rid / mdadm?
Back to top
View user's profile Send private message
kokoko3k
n00b
n00b


Joined: 06 May 2005
Posts: 72

PostPosted: Wed Apr 02, 2008 6:22 pm    Post subject: Reply with quote

boniek wrote:
Con Kolivas wrote:
CFQ has builtin ionice support which is automatically linked to nice level
unless you explicitly set ionice separately.(...) The ionice support is for reads only. Due to the complex
path writes take to get to the io scheduler there is no ionice support for
writes yes so they are all treated equally. Some work is being done in that
area but nothing is concrete yet. Watch this space.


...Even ionice manual said:
Quote:
Best effort. This is the default scheduling class for any process that hasn't asked for a specific io priority. Programs inherit the CPU nice setting for io priorities. This class takes a priority argument from 0-7, with lower number being higher priority. Programs running at the same best effort priority are served in a round-robin fashion.

But i really can't make it work; i wrote a simple bash script which make some benchmark using dd and different nice/ionice combinations.
The results i got are identical when comparing dd launched (in parallel and on different sectors of course) with nice -19 and nice +19, while differs significantly when using ionice.

Here is the script, to run root privileges are needed, as well as 2 partitions, just edit PART1 and PART2 variables.
http://pastebin.com/m73845a16

And here is my result:
http://pastebin.com/f6a37a60f

Is there anything i should do to 'link' nice and ionice priorities (apart from wrapper scripts of course) as stated in ionice manpage?
I'm using 2.6.22-gentoo-r1

Thanks in advance.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum