I run a website on a KVM VPS and I noticed that processes appear to run extremely slowly when being traced. For example, I ran ls
on my home directory, which contains 72 files and directories.
With strace
:
real 0m13.591s
user 0m0.024s
sys 0m6.972s
No particular system call is especially slow, but there is a noticeable (~0.1 s) pause after each one in the strace
output.
Without strace
:
real 0m0.101s
user 0m0.000s
sys 0m0.068s
I'm not sure whether this is related, but recursively removing large directories is also very slow. For example, I used
rsync -av `mktemp -d`/ dir
and it made extremely slow progress, removing only about 200 files per second. (That's slow, right?)
Is this a bug in KVM? Is there any way I could get my hosting company to fix it?
Update: I still don't know what the problem was, but rebooting fixed it.