Audio after heavy filesystem activity

Hasso Tepper hasso at estpak.ee
Thu Dec 20 01:11:24 PST 2007


Hasso Tepper wrote:
> It looks exactly the same as described in the thread ... It's OK for
> some time after boot, but often after heavy disc activity (rsync, hg
> pull, even scp sometimes) short (but very noticeable) glitches will
> appear in audio and they repeat after every ~30 sec. The same glitch in
> audio happens if I manually run sync command (it isn't there after boot
> either). I haven't discovered any way to get rid of these regular
> glitches in audio except boot. If it matters, I'm using snd_hda(4).

This is indeed the same problem as in FreeBSD - if number of vnodes grows 
too large, sync will start to take too much time causing fatal schedule / 
syscall latencies.

It was confusing me for some time why it happens only on some of my 
machines, but it's clear now. I did some small tests with my desktop with 
2GB memory and Intel Core 2 Duo E6320 (1.86GHz):

$ sysctl kern | grep vnode
kern.maxvnodes: 136848
kern.minvnodes: 34212

There is the easy way to trigger the problem: "find / -type f >/dev/null".
Audio glitches will appear if debug.numvnodes exceeds ~100000. Setting  
kern.maxvnodes to something below 100000 (I'm using 68424 - default in 
systems with 1GB memory) makes the problem to go away.

At least I have a workaround now, but it's not real fix of course. There 
is obvious performance problem that needs to be fixed.


-- 
Hasso








More information about the Kernel mailing list