[Mono-dev] Unstable ThreadPool performance under massive QueueUserWorkItem requests.

Laser Lu laser_lu at 163.com
Sat Nov 7 05:55:48 EST 2009


I'm writing a program that utilizes ThreadPool heavily.  More than thousands
of QueueUserWorkItem request may be generated during a second. And this
program works fine on Windows/.NET.
When I come to test on Linux/Mono, it becomes unstable. Large CPU
consumption often occurs. The same program usually takes 1-5% CPU on Windows
and similar hardware. However, on CentOS(2 core), the CPU usage may suddenly
jump to a very high (nearly 200%) level and then fall back to normal, and
then jump high again.. It seems very unstable.

Below is the output of command 'top |grep mono' (run on CentOS, 2 core CPU):
12926 root      15   0 43644  11m 4980 S 16.0  0.3   0:00.48 mono

12926 root      15   0 48068  15m 5052 S 18.6  0.5   0:01.04 mono

12926 root      15   0 80640  20m 5060 S 168.0  0.6   0:06.09 mono

12926 root      15   0 87372  22m 5064 S 189.3  0.7   0:11.78 mono

12926 root      15   0 85816  24m 5064 S 52.9  0.7   0:13.37 mono

12926 root      19   0 86408  24m 5064 S 13.3  0.7   0:13.77 mono

12926 root      19   0 86408  24m 5064 S 195.6  0.7   0:19.65 mono

12926 root      15   0 86408  24m 5064 S 195.9  0.7   0:25.54 mono

12926 root      18   0 91740  26m 5064 S 199.6  0.8   0:31.98 mono

12926 root      18   0 91740  26m 5064 S 191.2  0.8   0:37.96 mono

12926 root      15   0 91740  26m 5064 S 193.6  0.8   0:43.78 mono

12926 root      15   0 91740  26m 5064 S 199.3  0.8   0:49.77 mono

12926 root      15   0 91740  26m 5064 S 198.9  0.8   0:55.75 mono

12926 root      15   0 91740  26m 5064 S 199.9  0.8   1:01.76 mono

12926 root      15   0 91740  26m 5064 S 199.5  0.8   1:07.76 mono

12926 root      15   0 91740  26m 5064 S 199.9  0.8   1:13.77 mono

12926 root      15   0 91740  26m 5064 S 198.9  0.8   1:19.75 mono

12926 root      15   0 91740  26m 5064 S 199.3  0.8   1:25.74 mono

12926 root      15   0 91740  26m 5064 S 199.6  0.8   1:31.74 mono

12926 root      15   0 91740  26m 5064 S 199.9  0.8   1:37.75 mono

12926 root      23   0 91788  28m 5064 S 87.5  0.8   1:40.38 mono

12926 root      23   0 91196  28m 5064 S  0.3  0.8   1:40.39 mono

12926 root      15   0 91788  28m 5064 S 20.3  0.8   1:41.00 mono

12926 root      15   0 91196  28m 5064 S  4.3  0.8   1:41.13 mono

12926 root      15   0 91772  28m 5064 S 11.3  0.8   1:41.47 mono

12926 root      15   0 91772  27m 5064 S 22.0  0.8   1:42.13 mono

12926 root      15   0 91772  26m 5064 S 28.9  0.8   1:43.00 mono

12926 root      24   0 91196  26m 5064 S  1.3  0.8   1:43.04 mono

12926 root      15   0 91804  26m 5064 S 34.3  0.8   1:44.07 mono

12926 root      15   0 91196  26m 5064 S  4.3  0.8   1:44.20 mono

12926 root      17   0 91772  25m 5064 S 13.6  0.7   1:44.61 mono

12926 root      15   0 91196  25m 5064 S 16.0  0.7   1:45.09 mono

12926 root      15   0 91292  25m 5064 S  1.3  0.7   1:45.13 mono

12926 root      15   0 91804  24m 5064 S 134.6  0.7   1:49.40 mono

12926 root      15   0 91196  24m 5064 S 13.4  0.7   1:49.81 mono

12926 root      15   0 91196  24m 5064 S  0.7  0.7   1:49.83 mono

12926 root      15   0 91772  24m 5064 S 21.6  0.7   1:50.48 mono

12926 root      15   0 91804  23m 5064 S  3.3  0.7   1:50.58 mono

12926 root      15   0 91804  23m 5064 S 22.3  0.7   1:51.25 mono

12926 root      15   0 91804  23m 5064 S  3.3  0.7   1:51.35 mono

12926 root      24   0 91804  23m 5064 S 14.0  0.7   1:51.77 mono

12926 root      15   0 91196  23m 5064 S 14.6  0.7   1:52.21 mono

12926 root      15   0 91196  23m 5064 S  2.7  0.7   1:52.29 mono

12926 root      15   0 91804  23m 5064 S 178.9  0.7   1:57.67 mono

12926 root      15   0 91804  23m 5064 S 184.2  0.7   2:03.38 mono

12926 root      15   0 91804  23m 5064 S 196.5  0.7   2:09.29 mono

12926 root      15   0 91804  23m 5064 S 198.2  0.7   2:15.25 mono

12926 root      15   0 91804  23m 5064 S 198.1  0.7   2:21.21 mono

12926 root      15   0 91804  23m 5064 S 123.7  0.7   2:24.93 mono

12926 root      15   0 91196  24m 5064 S  1.7  0.7   2:24.98 mono

12926 root      15   0 91804  24m 5064 S 70.5  0.7   2:27.10 mono

12926 root      15   0 91804  24m 5064 S 198.7  0.7   2:33.27 mono

12926 root      15   0 91196  24m 5064 S 23.0  0.7   2:33.98 mono

12926 root      20   0 91212  24m 5064 S  1.0  0.7   2:34.01 mono

12926 root      15   0 91788  24m 5064 S 25.6  0.7   2:34.78 mono

12926 root      15   0 91196  24m 5064 S  1.0  0.7   2:34.81 mono

12926 root      17   0 91772  24m 5064 S 15.0  0.7   2:35.26 mono

12926 root      15   0 91196  24m 5064 S 12.0  0.7   2:35.62 mono

12926 root      15   0 91500  23m 5064 S  3.7  0.7   2:35.73 mono

12926 root      15   0 91644  23m 5064 S 183.1  0.7   2:41.24 mono

12926 root      15   0 91628  23m 5064 S 191.9  0.7   2:47.01 mono

12926 root      15   0 91628  23m 5064 S 197.2  0.7   2:52.94 mono

12926 root      15   0 91612  23m 5064 S 198.9  0.7   2:58.92 mono

12926 root      15   0 91596  23m 5064 S 199.2  0.7   3:04.91 mono

12926 root      15   0 91596  23m 5064 S 199.5  0.7   3:10.91 mono

12926 root      15   0 91596  23m 5064 S 199.5  0.7   3:16.91 mono

12926 root      15   0 91708  23m 5064 S 155.0  0.7   3:21.57 mono

12926 root      15   0 91260  24m 5064 S 92.4  0.7   3:24.35 mono

12926 root      15   0 91260  24m 5064 S 193.2  0.7   3:30.16 mono

12926 root      15   0 91740  24m 5064 S 104.4  0.7   3:33.30 mono

12926 root      17   0 91740  24m 5064 S 10.6  0.7   3:33.62 mono

12926 root      15   0 91196  24m 5064 S 11.0  0.7   3:33.95 mono

12926 root      15   0 91804  24m 5064 S 153.0  0.7   3:38.55 mono

12926 root      15   0 91804  24m 5064 S 195.5  0.7   3:44.43 mono

12926 root      15   0 91804  24m 5064 S 197.9  0.7   3:50.38 mono

12926 root      15   0 91804  24m 5064 S 197.2  0.7   3:56.31 mono

12926 root      15   0 91804  24m 5064 S 197.9  0.7   4:02.26 mono

12926 root      15   0 91804  24m 5064 S 197.5  0.7   4:08.20 mono

12926 root      15   0 91804  24m 5064 S 196.2  0.7   4:14.10 mono

12926 root      15   0 91804  24m 5064 S 199.9  0.7   4:20.11 mono

12926 root      15   0 91804  24m 5064 S 198.2  0.7   4:26.07 mono

12926 root      19   0 91196  23m 5068 S 21.9  0.7   4:26.73 mono          





More information about the Mono-devel-list mailing list