悠悠楠杉
网站页面
find papers/ -name "*.pdf" | parallel -j 90% '
pdftotext {} - |
keyword_analyzer > {}.keywords
'
bash
cat scenelist.txt | xargs -P 32 -I{} ssh render{} "
blender -b scene{}.blend -o //renders/ -F PNG -f 1
"
| 并发模式 | 内存占用 | 启动耗时 | 适用场景 |
|----------------|----------|----------|-------------------|
| xargs -P | 低 | 0.1s | 百万级小文件 |
| GNU parallel | 中 | 0.3s | 复杂任务调度 |
| Python多进程 | 高 | 1.2s | 数据科学管道 |