Skip site navigation (1)Skip section navigation (2)
Date:      06 Jul 2005 14:26:22 -0400
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Weird "nice" behavior
Message-ID:  <44u0j7iyep.fsf@be-well.ilk.org>
In-Reply-To: <pan.2005.07.06.03.56.44.535357@sremick.net>
References:  <pan.2005.07.06.03.56.44.535357@sremick.net>

next in thread | previous in thread | raw e-mail | index | archive | help
"Scott I. Remick" <scott@sremick.net> writes:

> I'm seeing something strange/annoying tonight... maybe someone could help
> explain why it's happening.
> 
> FreeBSD 5.4-RELEASE
> 
> I'm trying to do a large local rsync in the background, while listening to
> streaming audio via RealPlayer and do other stuff. I have the rsync
> running at nice level 20 ("nice -20") which I've confirmed via ps:
> 
> 1001 77010  1452   0 116 20 45056 44332 select SN+   p1    0:30.89 rsync -av - 
> 1001 77011 77010 295 139 20 45048 44232 -      RN+   p1   20:17.12 rsync -av - 
> 1001 77548 77011   0 116 20 45200 44460 select SN+   p1    0:12.06 rsync -av -
> 
> RealPlayer is running at normal nice (0):
> 1001 80675 80650  16  98  0 30004 12516 select S     p2    0:22.69 /usr/local/lib/RealPlayer/realplay.bin
> 1001 80688 80675   0  96  0 30004 12516 select S     p2    0:00.01 /usr/local/lib/RealPlayer/realplay.bin
> 1001 80689 80688   0  20  0 30004 12516 pause  S     p2    0:02.67 /usr/local/lib/RealPlayer/realplay.bin
> 1001 80692 80675  24  -8  0 13844  6772 piperd I     p2    0:00.00 /usr/local/lib/RealPlayer/realplay.bin
> 1001 80693 80675  24  -8  0 13844  6772 piperd I     p2    0:00.00 /usr/local/lib/RealPlayer/realplay.bin
> 1001 80694 80688  24  20  0 30004 12516 pause  I     p2    0:00.00 /usr/local/lib/RealPlayer/realplay.bin
> 1001 80695 80688   0  20  0 30004 12516 pause  S     p2    0:01.34 /usr/local/lib/RealPlayer/realplay.bin
> 1001 80696 80688   0   8  0 30004 12516 nanslp S     p2    0:01.13 /usr/local/lib/RealPlayer/realplay.bin
> 1001 80765 80688   0   8  0 30004 12516 nanslp S     p2    0:01.10 /usr/local/lib/RealPlayer/realplay.bin
> 
> Not sure why it spawns so many processes, but whatever...
> 
> Anyway, what's happening is despite rsync being nice 20, RealPlayer is
> incredibly choppy. Even if I'm not doing anything else on the system. 
> 
> Now here's the weirder part: if I DO do something, such as just scrolling
> a window, the audio stream stops being choppy. It's as if it takes some
> OTHER application claiming CPU cycles to get rsync to properly play "nice"
> and release up time, at which point RealPlayer gets the cycles it
> deserves. But for some reason, rsync with just RealPlayer on its own will
> not play "nice" and give up time to RealPlayer like it should since
> RealPlayer is running at 0 and rsync is running at 20.

Sounds like you're blocked on I/O, not CPU.  
SCSI drives with tagged queueing would probably perform better.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44u0j7iyep.fsf>