Search code examples
linuxubuntucpu-usageubuntu-13.04

Linux - system call not using all available CPU resources


I'm performing mv dir1 dir2/ and dir1 has hundreds of thousands of files, so it's taking a while.

Parallelization aside, the corresponding kernel thread is only using 15% of a CPU core, although there's virtually nothing else running on that core.

Is it possible to get it to use more?

I'm on Ubuntu 13.04.


Solution

  • moving files doesn't need that much CPU time since the CPU operations needed are much faster than the file system operations on hard disks. So once the kernel has sent the syscall to the file system to move a file, the CPU usually waits in idle mode for many cycles before the syscall is done and the CPU can send the next one. This is why file system operations almost never use 100% of the CPU resources.