Mailing List Archive

DVD insertions seem a bit 'aggressive' - creates delays/glitches, etc...
Hi all,
I'm wondering what folks who understand Linux configuration better
than I do about a problem like this. I run media all day while working
on my Gentoo/KDE box. The machine is generally over powered for 99% of
the work I do. It works _very_ hard when I kick off big numeric runs
(i.e. 100% usage for 2-30 minutes) but most of the time CPU usage is
running at <1-2% while I'm doing things like editing code and watching
a movie at the same time/

What I do notice however is that whether I'm watching NetFlix in a
VM or a movie on disk using VLC, when I insert a DVD I almost always
get a glitch of 1-2 seconds while the system figures out what to do
with the DVD. I see some CPU usage, but it's not like 12 processors go
to 100%.

As I seldom care if the system immediately knows what the DVD is
and would rather not get the glitches & delays, what sort of
configuration options do I have to control that?

In general I'm not finding any messages in either dmesg or
/var/log/messages. If I need to look elsewhere let me know.

Thanks,
Mark
Re: DVD insertions seem a bit 'aggressive' - creates delays/glitches, etc... [ In reply to ]
Mark Knecht, mused, then expounded:
> Hi all,
> I'm wondering what folks who understand Linux configuration better
> than I do about a problem like this. I run media all day while working
> on my Gentoo/KDE box. The machine is generally over powered for 99% of
> the work I do. It works _very_ hard when I kick off big numeric runs
> (i.e. 100% usage for 2-30 minutes) but most of the time CPU usage is
> running at <1-2% while I'm doing things like editing code and watching
> a movie at the same time/
>
> What I do notice however is that whether I'm watching NetFlix in a
> VM or a movie on disk using VLC, when I insert a DVD I almost always
> get a glitch of 1-2 seconds while the system figures out what to do
> with the DVD. I see some CPU usage, but it's not like 12 processors go
> to 100%.
>

As no one has stepped in here...Pretty much everything I;m suggesting,
you are going to hate.

- Turn off that system sucking automount daemon.

Hopefully, that fixes the issue for you. The rest are more drastic.

Here are the important things for a VM host, in order of decreasing
importance -

1) Storage - needs twice as much, must be fast. 7200 RPM SATA drives
are acceptable for read only NFS stores.

2) Memory - all DIMM slots filled, 8GB 1600 PC3-DDR DIMMS minimum.
Faster, lower latency, DIMMs preferred, but motherboard/bios may
down clock them.

3) Network - Wide bandwidth (Probably not an issue for you). 10GigE
minimum. Or bond at least 4 GigE ports to act as a single pipe.

4) CPU - Lower core count, 8-cores/socket max. More eats up I/O
Bandwidth, adds latency, generates wait states. Better to
oversubscribe the cpu than anything else.

On an even more micro level -

Storage - Make sure you have seperate drives for the OS - mostly read
only), /var - mostly write, and /home - mostly read, light write.
Typical setup would be a single SSD for the OS, RAID 1 for /var and
whatever RAID you like for /home using 10K RPM SAS drives preferred.

Use the proper file system - large sequential files: media, VM
images, etc. need XFS. Small r/w files need - EXT3.

Use a proper hardware RAID card - not a software raid. Proper
hardware raid cards will require a x8 PCIe slot and cost a few
hundred dollars.

Reduce the cpu core count to 4 and offload your numeric compute
requirements to a stack of RasberryPI compute engines, using your
main system as a head node for the cluster.

Bob
--
-
Re: DVD insertions seem a bit 'aggressive' - creates delays/glitches, etc... [ In reply to ]
em, okay after Bob posted something really not helpful, I will chime in too.

It is not the automount demon. It is linux destroying interactivity and
starving readers when their is disk based (and in this case, a dvd is a
disk) IO.

Old problem, you can go to lkml and complain a bit... but countless others
have done the same.

Two things: increase readahead. A lot. Not that stupid package, the kernel
setting. And if you are using SDDs use the no-op IO-scheduler.


2013/7/25 Bob Sanders <rsanders@sgi.com>

> Mark Knecht, mused, then expounded:
> > Hi all,
> > I'm wondering what folks who understand Linux configuration better
> > than I do about a problem like this. I run media all day while working
> > on my Gentoo/KDE box. The machine is generally over powered for 99% of
> > the work I do. It works _very_ hard when I kick off big numeric runs
> > (i.e. 100% usage for 2-30 minutes) but most of the time CPU usage is
> > running at <1-2% while I'm doing things like editing code and watching
> > a movie at the same time/
> >
> > What I do notice however is that whether I'm watching NetFlix in a
> > VM or a movie on disk using VLC, when I insert a DVD I almost always
> > get a glitch of 1-2 seconds while the system figures out what to do
> > with the DVD. I see some CPU usage, but it's not like 12 processors go
> > to 100%.
> >
>
> As no one has stepped in here...Pretty much everything I;m suggesting,
> you are going to hate.
>
> - Turn off that system sucking automount daemon.
>
> Hopefully, that fixes the issue for you. The rest are more drastic.
>
> Here are the important things for a VM host, in order of decreasing
> importance -
>
> 1) Storage - needs twice as much, must be fast. 7200 RPM SATA drives
> are acceptable for read only NFS stores.
>
> 2) Memory - all DIMM slots filled, 8GB 1600 PC3-DDR DIMMS minimum.
> Faster, lower latency, DIMMs preferred, but motherboard/bios may
> down clock them.
>
> 3) Network - Wide bandwidth (Probably not an issue for you). 10GigE
> minimum. Or bond at least 4 GigE ports to act as a single pipe.
>
> 4) CPU - Lower core count, 8-cores/socket max. More eats up I/O
> Bandwidth, adds latency, generates wait states. Better to
> oversubscribe the cpu than anything else.
>
> On an even more micro level -
>
> Storage - Make sure you have seperate drives for the OS - mostly read
> only), /var - mostly write, and /home - mostly read, light write.
> Typical setup would be a single SSD for the OS, RAID 1 for /var and
> whatever RAID you like for /home using 10K RPM SAS drives preferred.
>
> Use the proper file system - large sequential files: media, VM
> images, etc. need XFS. Small r/w files need - EXT3.
>
> Use a proper hardware RAID card - not a software raid. Proper
> hardware raid cards will require a x8 PCIe slot and cost a few
> hundred dollars.
>
> Reduce the cpu core count to 4 and offload your numeric compute
> requirements to a stack of RasberryPI compute engines, using your
> main system as a head node for the cluster.
>
> Bob
> --
> -
>
>
>
Re: DVD insertions seem a bit 'aggressive' - creates delays/glitches, etc... [ In reply to ]
On Thu, Jul 25, 2013 at 8:00 AM, Bob Sanders <rsanders@sgi.com> wrote:
> Mark Knecht, mused, then expounded:
>> Hi all,
>> I'm wondering what folks who understand Linux configuration better
>> than I do about a problem like this. I run media all day while working
>> on my Gentoo/KDE box. The machine is generally over powered for 99% of
>> the work I do. It works _very_ hard when I kick off big numeric runs
>> (i.e. 100% usage for 2-30 minutes) but most of the time CPU usage is
>> running at <1-2% while I'm doing things like editing code and watching
>> a movie at the same time/
>>
>> What I do notice however is that whether I'm watching NetFlix in a
>> VM or a movie on disk using VLC, when I insert a DVD I almost always
>> get a glitch of 1-2 seconds while the system figures out what to do
>> with the DVD. I see some CPU usage, but it's not like 12 processors go
>> to 100%.
>>
>
> As no one has stepped in here...Pretty much everything I;m suggesting,
> you are going to hate.
>
> - Turn off that system sucking automount daemon.
>
> Hopefully, that fixes the issue for you. The rest are more drastic.
>
> Here are the important things for a VM host, in order of decreasing
> importance -
>
> 1) Storage - needs twice as much, must be fast. 7200 RPM SATA drives
> are acceptable for read only NFS stores.
>
> 2) Memory - all DIMM slots filled, 8GB 1600 PC3-DDR DIMMS minimum.
> Faster, lower latency, DIMMs preferred, but motherboard/bios may
> down clock them.
>
> 3) Network - Wide bandwidth (Probably not an issue for you). 10GigE
> minimum. Or bond at least 4 GigE ports to act as a single pipe.
>
> 4) CPU - Lower core count, 8-cores/socket max. More eats up I/O
> Bandwidth, adds latency, generates wait states. Better to
> oversubscribe the cpu than anything else.
>
> On an even more micro level -
>
> Storage - Make sure you have seperate drives for the OS - mostly read
> only), /var - mostly write, and /home - mostly read, light write.
> Typical setup would be a single SSD for the OS, RAID 1 for /var and
> whatever RAID you like for /home using 10K RPM SAS drives preferred.
>
> Use the proper file system - large sequential files: media, VM
> images, etc. need XFS. Small r/w files need - EXT3.
>
> Use a proper hardware RAID card - not a software raid. Proper
> hardware raid cards will require a x8 PCIe slot and cost a few
> hundred dollars.
>
> Reduce the cpu core count to 4 and offload your numeric compute
> requirements to a stack of RasberryPI compute engines, using your
> main system as a head node for the cluster.
>
> Bob

Bob,
Thanks for the ideas. Sort of reminds me of the old joke:

Patient: "Doctor, it hurts when I do this."
Doctor: "So don't do that."

At some point, being that >95% of the time I'm watching either NetFlix
or Hulu streaming services, or a movie that I've ripped, I could
simply purchase a TV and Roku (or a TV with built-in streaming), mount
it on the wall above my 3 monitors and simply not use the computer to
do any of this stuff. It might be less expensive!

Since writing the original post I've sort of decided the problem is
so complex I'll likely never find the best answer. It turns out I was
doing all my streaming in a Win XP VM in VMWare Player. No good reason
other than it was an older and stable VM that was on the machine so I
was using it. I switched to streaming in a Win 7 Virtualbox VM and am
not seeing and problems at all. I can insert DVDs and rip using
Handbrake while streaming from Hulu and don't see any glitches. I
don't know if it's Virtualbox being better or Win 7 being better but
it works so that's good enough for me.

This doesn't solve the movie in VLC part of it but that's not a big
deal as I don't do that very often.

It does seem to me that logically the knob I should be turning is a
deeper network buffer in VMWare but I haven't looked or found anything
that drives that directly and likely will not look if things continue
to work well.

I will keep your inputs in mind going forward. This Core i7 980
Extreme machine was built in 2010 so it's getting a little long in the
tooth. Turns out that other than going with a high end RAID controller
there isn't a really good way to take advantage of 6Gb/S SATA drives
without going to a new motherboard so I've been pondering when I might
do that.

In terms of _really_ offloading compute cycles the strategy I''m
trying to prepare for with my own code, most of it written in R, is to
offload it to some dedicated NVidia GPUs. For a non-professional
programmer such as myself that's quite a stretch though.

Thanks for the inputs.

Cheers,
Mark
Re: DVD insertions seem a bit 'aggressive' - creates delays/glitches, etc... [ In reply to ]
On Thu, Jul 25, 2013 at 6:01 PM, Volker Armin Hemmann
<volkerarmin@googlemail.com> wrote:
> em, okay after Bob posted something really not helpful, I will chime in too.
>
> It is not the automount demon. It is linux destroying interactivity and
> starving readers when their is disk based (and in this case, a dvd is a
> disk) IO.
>
> Old problem, you can go to lkml and complain a bit... but countless others
> have done the same.
>
> Two things: increase readahead. A lot. Not that stupid package, the kernel
> setting. And if you are using SDDs use the no-op IO-scheduler.
>
>

Volker,
I'm interested in both the readahead and scheduler settings. I
played with this a bit when testing my RAID6 but never got around to
making anything permanent as I had a couple of questions:

1) Is there some standard place to put my desired settings within the
Gentoo configuration framework or do I have to write my own scripts,
etc.?

2) As the machine is RAID6 do I need to do this explicitly for all 5
drives (sd[a,b,c,d,e]) or can I do it for the RAID /dev/md3?

Thanks,
Mark
Re: DVD insertions seem a bit 'aggressive' - creates delays/glitches, etc... [ In reply to ]
On Sun, Jul 28, 2013 at 12:58 PM, Mark Knecht <markknecht@gmail.com> wrote:
<SNIP>
> 1) Is there some standard place to put my desired settings within the
> Gentoo configuration framework or do I have to write my own scripts,
> etc.?
<SNIP>

Just following up. I've put a few commands in
/etc/local.d/baselayout.start. They seem to hold after a reboot so I
guess this is a reasonable place for now.

Cheers,
Mark