Commit 68978f3
Chm: Maximize CPU utilization (#299)
Summary:
The worker threads are in a starved state because the producer’s production speed cannot keep up with the consumer’s consumption speed. The goal of the CHM benchmark is to maximize CPU utilization while minimizing interference from producers. This patch introduces a new parameter, worker_loop_count, which sets the number of times a worker thread loops over CHM operations. By increasing the worker thread’s active time, CPU utilization can reach 100%. Before this change, CPU utilization was around 20%. Test results show that throughput has significantly improved on some platforms. Alternatively, we could increase the number of producer threads to keep consumers busy, but our primary goal is to measure the throughput of consumer threads without adding extra producer-side overhead.
Pull Request resolved: #299
Reviewed By: charles-typ
Differential Revision: D87083803
Pulled By: YifanYuan3
fbshipit-source-id: a6f9ecc8f5016469b9864c4915f29f5b2b2345f91 parent cbd654a commit 68978f3
File tree
2 files changed
+16
-7
lines changed- benchpress/config
- packages/ai_wdl/chm
2 files changed
+16
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
178 | 179 | | |
| 180 | + | |
179 | 181 | | |
180 | 182 | | |
181 | 183 | | |
| |||
187 | 189 | | |
188 | 190 | | |
189 | 191 | | |
| 192 | + | |
190 | 193 | | |
191 | 194 | | |
192 | 195 | | |
193 | 196 | | |
194 | 197 | | |
195 | 198 | | |
196 | 199 | | |
| 200 | + | |
197 | 201 | | |
198 | 202 | | |
199 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
| 311 | + | |
310 | 312 | | |
311 | 313 | | |
312 | 314 | | |
| |||
599 | 601 | | |
600 | 602 | | |
601 | 603 | | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
606 | 609 | | |
607 | | - | |
608 | | - | |
609 | | - | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
610 | 614 | | |
611 | 615 | | |
612 | 616 | | |
| |||
654 | 658 | | |
655 | 659 | | |
656 | 660 | | |
| 661 | + | |
657 | 662 | | |
658 | 663 | | |
659 | 664 | | |
| |||
0 commit comments