Gentoo Archives: gentoo-user

From: Florian Philipp <lists@××××××××××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Tweak nice
Date: Sun, 24 Feb 2008 20:50:23
Message-Id: 1203886205.10427.128.camel@NOTE_GENTOO64.PHHEIMNETZ
In Reply to: Re: [gentoo-user] Tweak nice by Uwe Thiem
1 On Sun, 2008-02-24 at 17:45 +0200, Uwe Thiem wrote:
2 > On Sunday 24 February 2008, Florian Philipp wrote:
3 > > Hi!
4 > >
5 > > I noticed a very annoying behavior. I've got a headless server
6 > > (Athlon 64 X2) which primarily acts as a personal video recorder
7 > > using mencoder and at-daemon. In its idle-time it's supposed to run
8 > > a dnet-client.
9 > >
10 > > Then I've got a laptop (64bit Celeron, single core) on which I play
11 > > those video files from my server over NFS.
12 > >
13 > > So far, so good. My problem is: Neither of them can handle
14 > > recording/playing video while there is any background activity.
15 > > That means I have to stop the dnet-daemon and suspend any emerges
16 > > on my laptop. If I don't, both mencoder and mplayer loose sync of
17 > > audio and video and drops frames.
18 >
19 > By dnet-daemon you mean dnetc, right? If you run dnetc with nice 19
20 > and simultaneously something that uses as much CPU as it can get
21 > (like a fractals generator) at nice 0, you will see that dnetc still
22 > uses around 6% CPU. But it does go down to 6%. The remaining CPU
23 > should be enough for watching video. Disclaimer: I have never used
24 > mplayer on a 64bit system. It might have issues there.
25 >
26 > Since you are playing the video over NFS you do so over the network.
27 > Maybe a stupid question: You do use FastEthernet without any hub,
28 > right? Switches are alright but hubs are evil.
29 >
30 > A possiible work around might be to increase the buffer in mplayer to
31 > something around 1MB.
32 >
33 > Uwe
34
35 Yep, I meant dnetc (I thought dnet-client would be better
36 understandable). And yes, it does go down but not far enough, especially
37 because there are two such processes (one for each core). By the way:
38 Another daemon who's causing problems is clrngd, creating 100%
39 CPU-utilization every 4 minutes for about 1 minute.
40
41 I neither use a switch nor a hub, just a good old crossover cable.
42
43 In fact, I used to let mplayer create a 8MB cache but without background
44 activity it was useless and with it, it's got eaten up too soon.
45 Mencoder seems to utilize a queue/fifo/whatever-you-might-call-it by
46 default but that doesn't help if it doesn't reach 25fps.
47
48 Since nobody seems to have an idea, maybe someone can tell me how I
49 allow processes with real-time priority (nice -n -20) to be started by
50 an ordinary user? Of course I'm aware of sudo but I don't want a simple
51 media encoder to have super-user permissions.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Tweak nice Uwe Thiem <uwix@××××.na>