#23433: Windows relay: 85% of CPU power is wasted inside select() call ------------------------------+-------------------------------- Reporter: Vort | Owner: (none) Type: defect | Status: new Priority: Medium | Milestone: Tor: unspecified Component: Core Tor/Tor | Version: Tor: 0.3.1.5-alpha Severity: Normal | Keywords: tor-relay windows Actual Points: | Parent ID: Points: | Reviewer: Sponsor: | ------------------------------+-------------------------------- Since I have eliminated the network slowdown with patch from #22798, I have started to face another problem: As connection count began to grow, CPU resources consumption start growing too. Now, with 3700 connections and 1 MiB/s of Tor traffic, CPU is [[attachment:tor_cpu.png|loaded at 15%]]. With 3 MiB/s of traffic, CPU load goes up to maximum 25% (full load of 1 CPU core). It is possible to think that Tor uses much cryptography and that thing is overloading my PC. But no. Much of the time (88 hours of total 102 hours) tor.exe process spends in kernel mode. Most probably, inside `WS2_32.dll!select` function (called from libevent library). This specificity limits maximum speeds, which can be achieved using Tor relay with Windows. And, most likely, it can be fixed by using the different approaches for network API interaction.
CPU: Intel Core i5-4690 OS: Windows 7 SP1 x64 -- Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23433> Tor Bug Tracker & Wiki <https://trac.torproject.org/> The Tor Project: anonymity online
_______________________________________________ tor-bugs mailing list tor-bugs@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs