Today processors usually contain several physical cores. They can even be multithreaded, so the Linux kernel sees a fairly large number of kernels and, accordingly, it runs the Linux scheduler several times (one for each kernel). When running several tasks on a Linux system, the scheduler usually provides a good distribution of the total workload to all Linux kernels (it can be the same physical kernel).
Now, let's say I have a large number of files to process with the same executable. I usually do this with the find command:
find <path> <option> <exec>
However, this only launches one task at a time and waits for it to complete before the next task begins. Thus, only one core is used for this at any time. This leaves most cores inactive (if this find command is the only task running on the system). It would be much better to run N tasks at the same time. Where N is the number of kernels visible by the Linux kernel.
Is there a team that will do this?
source share