On Tuesday, July 14, 2015 10:24:23 AM Philippe McLean wrote:
> - Gerrit version 2.11.1
>
> I'm not sure the limiting factor --- when running top,
> CPU rarely exceeds 20%.
Depending on how you are reading top, on a 4 core machine,
that might be close to maxing out a single core? I have no
experience with running top in a VM, to see how it behaves.
But generally, a clone is single threaded, so it can only
use one core.
> What tools & approach do you recommend I use now?
I generally use top and iotop, sometimes iftop. I use
vmstat to see if I am waiting for disk seeks (if iotop shows
little activity, and CPU is low, sometimes it is disk
seeks).
I suggest maybe you experiment with other hardware to see if
faster CPUs will boost your throughput.
It might be worth testing other programs to see if you can
quantify the output of your tools better. For example,
get/write a program that consumes tons of CPU (single core),
and see how top behaves. Do a simple netcat on your
machine, and measure the maximum throughput with that.
How were you estimating the throughput, using git's progress
bar output? Some of the things I mention above tend to
limit clone speeds, however not generally the network IO
portion of the clone. In other words, a clone does tons of
IO and CPU work up front, but once it builds a new pack in
memory, I think it just streams it out. During the
streaming out portion, disk IO should not limit you, and
neither should CPU. However, encryption could (which is
CPU), but I generally don't see that on my servers.
Are you swapping, or encountering some sort of RAM bandwidth
limitation imposed by your VM setup?
Are you cloning over ssh or https?