Commit 0c0e25e
Move runFeatureExtraction off the dispatcher; enable for dlrm_mini
Summary:
DLRMRequestHandler used to call runFeatureExtraction synchronously on the dispatcher (ThriftSrv.IO) thread, blocking the IO loop for the duration of feature extraction. Worse, feedsim_autoscale_dlrm_mini didn't pass --feature-extractors at all, so on the fixed-QPS variant the call was a no-op anyway and FeatureExtraction's CPU share dropped to ~0% (vs production's 30-35%). The recent higher-QPS sweeps showed BGM at 80% idle past saturation — there's plenty of CPU room to host real feature extraction work, and getting the share up is required to match the production multifeed_aggregator microarchitectural profile.
This commit reshapes DLRMRequestHandler's pipeline:
* runFeatureExtraction is dispatched async via the same RANKER -> GlobalCPUThread pattern that GetStoriesUncompressedRequestHandler already uses (folly::via(srvCPUThreadPool, lambda { return folly::via(cpuThreadPool, runFeatureExtraction); })). RANKER orchestrates; GlobalCPUThread runs the generated vc_* extractor functions. The dispatcher returns immediately.
* Feature extraction starts at the head of the async chain in parallel with the DLRM inference future that was kicked off above. Both run on cpuThreadPool (folly::CPUThreadPoolExecutor is multi-threaded so the two stages overlap). After feature extraction completes, the chain waits for inference, then proceeds to simulateIoOrFanout / pointer chase / response generation.
* feedsim_autoscale_dlrm_mini now passes --feature-extractors --feature-complexity=5 --num-stories=100 --extractors-per-story=50 by default. That's 5000 extractor calls per request, the count tuned during Phase 2 to match production's instruction mix. If the resulting CPU share doesn't reach the 30-35% target, the knobs are tunable per-run via -i.
Differential Revision: D1051192201 parent 7142fad commit 0c0e25e
2 files changed
Lines changed: 49 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
805 | 805 | | |
806 | 806 | | |
807 | 807 | | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
808 | 812 | | |
809 | 813 | | |
810 | 814 | | |
| |||
831 | 835 | | |
832 | 836 | | |
833 | 837 | | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
834 | 841 | | |
835 | 842 | | |
836 | 843 | | |
| |||
Lines changed: 42 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1192 | 1192 | | |
1193 | 1193 | | |
1194 | 1194 | | |
1195 | | - | |
1196 | | - | |
1197 | | - | |
1198 | | - | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
1199 | 1199 | | |
1200 | 1200 | | |
1201 | 1201 | | |
| |||
1254 | 1254 | | |
1255 | 1255 | | |
1256 | 1256 | | |
1257 | | - | |
1258 | | - | |
1259 | | - | |
1260 | | - | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
1261 | 1268 | | |
1262 | 1269 | | |
1263 | 1270 | | |
| |||
1268 | 1275 | | |
1269 | 1276 | | |
1270 | 1277 | | |
1271 | | - | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
1272 | 1305 | | |
1273 | 1306 | | |
1274 | 1307 | | |
| |||
0 commit comments