Gentoo Archives: gentoo-user

From: Alex Schuster <wonko@×××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] I want to play movies without hangs
Date: Mon, 07 May 2012 21:13:55
Message-Id: 20120507231123.49125d30@weird.wonkology.org
In Reply to: Re: [gentoo-user] I want to play movies without hangs by Mark Knecht
1 Mark Knecht writes:
2
3 > On Mon, May 7, 2012 at 5:41 AM, Alex Schuster <wonko@×××××××××.org>
4 > wrote:
5 > > Some while ago, I wrote:
6 > >
7 > > [
8 > > mplayer stutters when I/O is going on, even hangs for seconds when I
9 > > do a dd if=/dev/zero of=somefile bs=1M
10 > > ]
11 [...]
12 > OK, fire up two terminals. In one run top, hit 1 & z so you see all
13 > your CPUs and then watch CPU usage. In the second terminal su to root
14 > and run iotop -o. Now, watch for a few minutes and get a feel for
15 > what's going on when video is not running. Then start your video and
16 > watch IO usage and CPU usage. Where's the problem?
17 >
18 > Once you get an idea where the bottleneck is we can address what a
19 > solution might be. In general, if the CPUs aren't maxed out and it's
20 > an I/O problem then usually a bit more buffering is a simple solution.
21 > Other more draconian solution might be a real-time kernel with a
22 > player (if there is one) that is set up for real-time playback.
23 >
24 > Looking forward to hearing your test results.
25
26 Thanks for your support, Mark!
27
28 I did this already, but sometimes I do not notice anything. I guess it's
29 short I/O operations in that case. CPU load is not the problem, and it
30 happens for both high-quality videos and small ones.
31 Currently iotop shows stuff like kjournald, kworker, kdeinit4,
32 akonadiserver, firefox. And lots of virtuoso-t and nepomuk when I enable
33 indexing again, which I just suspended.
34 And mplayer of course, it shows up in about every 2nd redisplay, which
35 happens every second.
36
37 Well... but when I do the same in the other window manager, it seems I
38 see fewer processes then. Are they mostly suspended when I am on another
39 display?
40 And I should fire up the same stuff (Firefox, Chromium, maybe KDEPIM
41 stuff) in the other WM and see if this makes things worse. But I'll do
42 this tomorrow. Thanks for the inspiration, though, at least I have
43 something more to try now.
44
45 The interrupts are very small normally, but noticeable, annoying and
46 somewhat embarrassing. When they just happened I only noticed akonadi and
47 kjournald during that time. I can force larger interrupts by doing my dd
48 command.
49
50 But anyway - my intention is not so much to find out what all these
51 I/O processes are and how to make them calm down, renice them or whatever.
52 Four cores @ 3.6 GHz just should be able to play movies without any
53 interruption. And it _is_ possible, when I start the playback on another
54 window manager, while KDE is still running on the other display.
55
56 I could just switch to, um, ummmm.... Gnome maybe... or Xfce4... or
57 something else, but I would not like to do so. Despite by big KDE
58 problems. I hate KDE. But I still want it. I feel mad.
59
60 Wonko

Replies

Subject Author
Re: [gentoo-user] I want to play movies without hangs Alex Schuster <wonko@×××××××××.org>