On Wed, Dec 23, 2015 at 01:21:17AM +0100, Kamil Rytarowski wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > The simplest way to reduce >90% CPU usage to <1% on a NetBSD host is > the following set of two commands (assuming running daemon): > > pacmd "unload-module module-oss" > pacmd "load-module module-oss mmap=0 device=/dev/audio" > > In general there is an assumption of Linux-like feature to efficiently > poll(2) mmap'ed region. This operation is very slow on NetBSD. > > This is a temporary walk-around, I will be looking for a permanent one.
Workaround for the pulseaudio package: --- /usr/pkgsrc/audio/pulseaudio/patches/patch-src_modules_module-detect.c.orig 2015-12-25 10:19:03.000000000 +0100 +++ /usr/pkgsrc/audio/pulseaudio/patches/patch-src_modules_module-detect.c 2015-12-25 10:18:23.000000000 +0100 @@ -14,7 +14,7 @@ + * And only primary sound device will be used (n=1). + */ + char args[64]; -+ pa_snprintf(args, sizeof(args), "device=/dev/audio"); ++ pa_snprintf(args, sizeof(args), "mmap=0 device=/dev/audio"); + if (!pa_module_load(c, "module-oss", args)) + exit(1); + n = 1; Onno
