Ticket #107 (closed enhancement: wontfix)

Opened 5 years ago

Last modified 4 years ago

suggestion optimization: libevent

Reported by: Lennie Owned by: lennart
Milestone: Component: daemon
Keywords: performance Cc:

Description

It seems PulseAudio uses a lot of CPU, more then 2 times as much as 4 mplayers together playing mp3/ogg streams. This is probably not such a great idea, as the PulseAudio has a very high priority.

When I look at the daemon with strace, I notice a _lot_ of polling, I would like to suggest looking into using something like epoll or better even, because PulseAudio is so portable across platforms, libevent.

It's just a suggestion.

I don't know the code very well, so maybe I've got it all wrong, it's just my first thought when looking at it.

It could possible make it more scalable and perform better.

I hope this was usefull, keep up the good work.

Change History

Changed 5 years ago by Lennie

There was something I forgot to mention, using an event-based system like epoll also could reduce power-usage, this is good for laptops, proper funcioning of power management and good for system running 24/7 like media-players.

It's also good for the energy bill and possible thus the environment might you care about that last bit.

Changed 4 years ago by lennart

  • status changed from new to closed
  • resolution set to wontfix

The only advantage of epoll is that it scales better if you have a large number of file descriptors. However, in PA we usually have only very few: the sound device and a very limited number of clients. Presumably using epoll would actually be a bad thing because it increases the overall number of system calls necessary.

The "lennart" branch in SVN now contains a module "module-supend-on-idle" which when loaded makes sure all audio devices are closed when nothing is played. This brings the number of interrupts to zero, when idle.

Note: See TracTickets for help on using tickets.