多线程排序
sort
supports --parallel N
to run N thread. However, it seems it only uses around 100% CPU as I observed although the command specified that N threads can be used.
sort
支持--parallel N
运行N 线程 。 但是,尽管该命令指定可以使用N个线程,但据我观察,它似乎仅使用大约100%的CPU。
The command is as follows
命令如下
cat large-file | sort --parallel `nproc`
where I have 16 from nproc
.
我有16个来自nproc
。
How to make sort use multiple threads to run faster?
如何使排序使用多个线程来更快地运行?
It is pos