XD icon indicating copy to clipboard operation
XD copied to clipboard

Coalesce events/Minimize wakeups

Open nwmcsween opened this issue 8 years ago • 3 comments

Currently (with git) running a few dozen torrents causes high CPU usage due to events/s as per powertop.

nwmcsween avatar Apr 11 '18 19:04 nwmcsween

It's really bad, powertop shows: 295.4 ms/s 17975.6 Process /usr/local/bin/xd that's ~20,000 wakeups a second, meaning almost all CPU usage is overhead.

nwmcsween avatar Apr 12 '18 02:04 nwmcsween

currently each torrent and peer connection has several go routines that use busy loops, probably better to restructure that. the whole xd/lib/bittorrent/swarm package needs to be broken up into a many sub packages. i have neglected this refactor.

majestrate avatar Apr 12 '18 13:04 majestrate

can you tell me if https://github.com/majestrate/XD/commit/4ad8382468e71d4747912939b80869547aa0d745 is better or worse?

majestrate avatar Apr 18 '18 11:04 majestrate