FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 05-08-2012, 08:43 PM
Simon
 
Default I want to play movies without hangs

> Also, there was a thread a good while back with this issue and their fix
> was to do a emerge -e world with everything optimized for their CPU and
> such. *May be worth thinking about at least.

Video playback and CPU optimisations go hand in hand.

One video I have had for a long time, I could never play it at all on
any of my computers and I could not beleive what I saw next...
I got a new PC and thought to give it a try. It worked painfully,
skipping and using 100% of one of my CPU cores. I was sad and thought
this video might have been corrupt. After a wave of cleanup, I had
removed all CPU optimisation flags from my make.conf (I was originally
negating many, like -sse, etc, so I left it "to my profile" to choose
what was needed) and recompiled everything. After that, the same
movie played in the best quality I had ever seen and CPU usage was
below 5% !!!! I was even able to open 12 movies (4x3) all playing at
the same time (this was unthinkable before I optimized my system).
Anyway, keep in mind that my particular starting scenario was that I
had "un-optimized" it long ago!

Good luck!
 
Old 05-09-2012, 07:44 PM
Alex Schuster
 
Default I want to play movies without hangs

I wrote:

> Mark Knecht writes:

> > OK, fire up two terminals. In one run top, hit 1 & z so you see all
> > your CPUs and then watch CPU usage. In the second terminal su to root
> > and run iotop -o. Now, watch for a few minutes and get a feel for
> > what's going on when video is not running. Then start your video and
> > watch IO usage and CPU usage. Where's the problem?
> >
> > Once you get an idea where the bottleneck is we can address what a
> > solution might be. In general, if the CPUs aren't maxed out and it's
> > an I/O problem then usually a bit more buffering is a simple solution.
> > Other more draconian solution might be a real-time kernel with a
> > player (if there is one) that is set up for real-time playback.
> >
> > Looking forward to hearing your test results.
>
> Thanks for your support, Mark!
>
> I did this already, but sometimes I do not notice anything. I guess it's
> short I/O operations in that case. CPU load is not the problem, and it
> happens for both high-quality videos and small ones.
> Currently iotop shows stuff like kjournald, kworker, kdeinit4,
> akonadiserver, firefox. And lots of virtuoso-t and nepomuk when I enable
> indexing again, which I just suspended.
> And mplayer of course, it shows up in about every 2nd redisplay, which
> happens every second.
>
> Well... but when I do the same in the other window manager, it seems I
> see fewer processes then. Are they mostly suspended when I am on another
> display?

I watched for longer now, and this does not seem to be true.

> And I should fire up the same stuff (Firefox, Chromium, maybe KDEPIM
> stuff) in the other WM and see if this makes things worse. But I'll do
> this tomorrow. Thanks for the inspiration, though, at least I have
> something more to try now.

I am running Enlightenment 0.16 in parallel now, with Firefox, Chromium,
Kontact, Claws, Liferea, Amarok (which is doing a lot of I/OP stuff at
the moment according to iotop), and Dolphin showing a large directory of
multimedia files wit thumbnails. But I don't see akonadi related processes
in iotop, that is unusual.
I did the dd command to create more I/O. No gaps in video display at all.

When I play the video from within KDE (running Konsoles, Konqueror,
Dolphin and a lot of plasma stuff), I have gaps, and when I do the dd
command, there are in the range of seconds. Even for some seconds after
I canceled the dd.

I also tried a fresh, unconfigured KDE session by another user. I've
already done that, and there were also gaps in video playback, although
it seems they were fewer. But this time, I was not able to reproduce
them. Huh?

I guess I could remove anything running on my KDE desktop one by one,
including plasmoids, and see if playback gets better. But not now, I
finally have to actually do some work.

Wonko
 
Old 05-09-2012, 08:38 PM
Neil Bothwick
 
Default I want to play movies without hangs

On Wed, 9 May 2012 21:44:19 +0200, Alex Schuster wrote:

> I guess I could remove anything running on my KDE desktop one by one,
> including plasmoids, and see if playback gets better. But not now, I
> finally have to actually do some work.

I recently experienced slowdowns and delays with KDE. It turned out I had
inadvertently disabled swap (I'd rearranged my partitions and not updated
fstab). As soon as I gave it some swap space the delays disappeared.


--
Neil Bothwick

Sarchasm : The gulf between the author of sarcastic wit and the person
who doesn't get it.
 
Old 05-10-2012, 01:00 AM
Alex Schuster
 
Default I want to play movies without hangs

Neil Bothwick writes:

> On Wed, 9 May 2012 21:44:19 +0200, Alex Schuster wrote:
>
> > I guess I could remove anything running on my KDE desktop one by one,
> > including plasmoids, and see if playback gets better. But not now, I
> > finally have to actually do some work.
>
> I recently experienced slowdowns and delays with KDE. It turned out I
> had inadvertently disabled swap (I'd rearranged my partitions and not
> updated fstab). As soon as I gave it some swap space the delays
> disappeared.

There's plenty of swap space available. With 16 G of RAM it should not
be needed, but sometimes my load gets really really high, and when I can
use the system again, there is 2-3 G of swap usage. I haven't found out
yet what this is, it seems to happen when emerging things, maybe related
to having 5 G tmpfs for portage, but when it happened the last time only
100 M were being used.

Wonko
 
Old 05-10-2012, 02:09 AM
Dale
 
Default I want to play movies without hangs

Alex Schuster wrote:
> Neil Bothwick writes:
>
>> On Wed, 9 May 2012 21:44:19 +0200, Alex Schuster wrote:
>>
>>> I guess I could remove anything running on my KDE desktop one by one,
>>> including plasmoids, and see if playback gets better. But not now, I
>>> finally have to actually do some work.
>>
>> I recently experienced slowdowns and delays with KDE. It turned out I
>> had inadvertently disabled swap (I'd rearranged my partitions and not
>> updated fstab). As soon as I gave it some swap space the delays
>> disappeared.
>
> There's plenty of swap space available. With 16 G of RAM it should not
> be needed, but sometimes my load gets really really high, and when I can
> use the system again, there is 2-3 G of swap usage. I haven't found out
> yet what this is, it seems to happen when emerging things, maybe related
> to having 5 G tmpfs for portage, but when it happened the last time only
> 100 M were being used.
>
> Wonko
>
>


Is there a way to find out what is using swap? Maybe something related
to the video is on swap which at times can be slow, certainly slower
than ram.

I have always wondered how to find this out myself.

Dale

:-) :-)

--
I am only responsible for what I said ... Not for what you understood or
how you interpreted my words!

Miss the compile output? Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"
 
Old 05-10-2012, 02:40 AM
Adam Carter
 
Default I want to play movies without hangs

> Is there a way to find out what is using swap? *Maybe something related
> to the video is on swap which at times can be slow, certainly slower
> than ram.
>
> I have always wondered how to find this out myself.

Well the OS uses swap, i dont know if its possible to then tie that
directly to a process. You can find out if swap is being at all using
with vmstat; so= swap out, si=swap in.

For example, watch the following when you view the video

adam@proxy ~ $ vmstat -S M 3
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 0 1290 379 6617 0 0 26 56 108 107 2 3 93 2
0 0 0 1290 379 6617 0 0 1 15 87 91 0 0 100 0
0 0 0 1290 379 6617 0 0 0 0 59 54 0 0 100 0
0 0 0 1290 379 6617 0 0 0 7 72 73 0 0 100 0
 
Old 05-10-2012, 03:59 AM
Adam Carter
 
Default I want to play movies without hangs

> There's plenty of swap space available. With 16 G of RAM it should not
> be needed, but sometimes my load gets really really high, and when I can
> use the system again, there is 2-3 G of swap usage. I haven't found out
> yet what this is, it seems to happen when emerging things, maybe related
> to having 5 G tmpfs for portage, but when it happened the last time only
> 100 M were being used.

Yeah so it wont be swap related. This sounds more like the desktop
responsiveness issue discussed a while back. It might be worth
googling that (main issue was fixed in later kernels)
http://www.phoronix.com/scan.php?page=article&item=linux_2637_video&num=1

There's other things that may help, ie
CONFIG_HZ_1000=y
CONFIG_HZ=1000
 
Old 05-10-2012, 07:53 AM
Dale
 
Default I want to play movies without hangs

Adam Carter wrote:
>> Is there a way to find out what is using swap? Maybe something related
>> to the video is on swap which at times can be slow, certainly slower
>> than ram.
>>
>> I have always wondered how to find this out myself.
>
> Well the OS uses swap, i dont know if its possible to then tie that
> directly to a process. You can find out if swap is being at all using
> with vmstat; so= swap out, si=swap in.
>
> For example, watch the following when you view the video
>
> adam@proxy ~ $ vmstat -S M 3
> procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
> r b swpd free buff cache si so bi bo in cs us sy id wa
> 0 0 0 1290 379 6617 0 0 26 56 108 107 2 3 93 2
> 0 0 0 1290 379 6617 0 0 1 15 87 91 0 0 100 0
> 0 0 0 1290 379 6617 0 0 0 0 59 54 0 0 100 0
> 0 0 0 1290 379 6617 0 0 0 7 72 73 0 0 100 0
>
>


I'm not the OP but posted a two part post that didn't quite come out
like I expected. One for the OP to try to find out what was using swap,
just in case it mattered. Two to ask how that is done in case he didn't
know and for me since I don't know either. lol

I was hoping for a command that says program foo is using X amount of
swap but I guess not.

Interesting that there isn't a real good tool for this.

Dale

:-) :-)

--
I am only responsible for what I said ... Not for what you understood or
how you interpreted my words!

Miss the compile output? Hint:
EMERGE_DEFAULT_OPTS="--quiet-build=n"
 
Old 05-10-2012, 08:02 AM
Michael Hampicke
 
Default I want to play movies without hangs

Am 10.05.2012 05:59, schrieb Adam Carter:
>> There's plenty of swap space available. With 16 G of RAM it should not
>> be needed, but sometimes my load gets really really high, and when I can
>> use the system again, there is 2-3 G of swap usage. I haven't found out
>> yet what this is, it seems to happen when emerging things, maybe related
>> to having 5 G tmpfs for portage, but when it happened the last time only
>> 100 M were being used.
>
> Yeah so it wont be swap related. This sounds more like the desktop
> responsiveness issue discussed a while back. It might be worth
> googling that (main issue was fixed in later kernels)
> http://www.phoronix.com/scan.php?page=article&item=linux_2637_video&num=1
>
> There's other things that may help, ie
> CONFIG_HZ_1000=y
> CONFIG_HZ=1000
>

Does the CONFIG_HZ setting today really have that much of an impact? I
mean with tickles kernels and high res timers it should matter that
much, or am I wrong?
Playing video is not really a low-latency-multimedia-app, on the other
hand: you never really know
 
Old 05-10-2012, 10:45 PM
Paul Hartman
 
Default I want to play movies without hangs

On Wed, May 9, 2012 at 8:00 PM, Alex Schuster <wonko@wonkology.org> wrote:
> Neil Bothwick writes:
>
>> On Wed, 9 May 2012 21:44:19 +0200, Alex Schuster wrote:
>>
>> > I guess I could remove anything running on my KDE desktop one by one,
>> > including plasmoids, and see if playback gets better. But not now, I
>> > finally have to actually do some work.
>>
>> I recently experienced slowdowns and delays with KDE. It turned out I
>> had inadvertently disabled swap (I'd rearranged my partitions and not
>> updated fstab). As soon as I gave it some swap space the delays
>> disappeared.
>
> There's plenty of swap space available. With 16 G of RAM it should not
> be needed, but sometimes my load gets really really high, and when I can
> use the system again, there is 2-3 G of swap usage. I haven't found out
> yet what this is, it seems to happen when emerging things, maybe related
> to having 5 G tmpfs for portage, but when it happened the last time only
> 100 M were being used.

Hi,

I realize this thread is bigger than an encyclopedia by now, so I
apologize if this has already been suggested.

I'm curious if you look at /proc/interrupts if the disk with I/O
problems is sharing interrupt with some other device. Maybe there is a
conflict of some sort.

On my motherboard, one of the SATA controllers shares an interrupt
with the soundcard, for example.
 

Thread Tools




All times are GMT. The time now is 05:45 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org