Re: Rsync on servers
On 11/02/2001 02:31:48 PM Alan Shutko wrote:
>> email@example.com (Otto Wyss) writes:
>> > Just reading bytes off a disk also need a considerable amount of CPU
>> > pushing them out through a TCP/IP-Stack as well.
>> Here's a comparison of transfering a 10MB test file using rcp and
>> rsync. I send a file first where there's nothing to conflict with on
>> Although this test sends the whole file over, we know how much CPU
>> time it takes to do this and can factor that out. And this is on a
>> machine with crappy IDE drives. PIII700, UDMA33 IDE, 100baseT 3c575
>> cardbus NIC.
>> [15:15:20] wesley:~ $ time rsync testfile alan@devlinux:testfile.rsync
>> real 0m5.348s
>> user 0m4.000s
>> sys 0m0.600s
>> If you still believe that disk and network access predominates over
>> rsync's cpu access, I challenge you to come up with any test that
>> demonstrates it.
10 megabytes * 8 = 80 megabits
80 megabits / 5.348 sec = abt 15 megabits/sec = abt 2 megabytes/sec
The network would be your limiter if you're using 10 meg ether or slower.
Obviously someone on a T1, cablemodem or DSL line will be limited by
bandwidth instead of CPU power.
Assuming a "one-speed" cdrom is 150Kilobytes/sec, using a 12-times CDRom or
slower, the CDrom would be the limiter.
I don't remember average transfer rates of old IDE drives, but something in
PIO mode 4 with real slow seek times MIGHT be unable to SUSTAIN two
megabytes/sec, or if the filesystem is heavily loaded (multiple
simultaneous rsyncs?) that individual process might not get it's 2 megs.
As for Otto's claim that shoving bits thru the TCP/IP stack takes lots of
CPU power, my 486/25SX firewall on a 608K DSL link using 10 meg ISA LAN
adapters and kernel 2.4 iptables, runs about 10% utilization when
masquerading packets at full rate. So my old 486 should be able to push 6
megabits at full rate.
In summary, I would not expect any Debian mirror to be limited by hard
drive transfer rates or TCP stack thruput, but I'd expect a poorly
connected mirror to be limited by network transfer rates. Depending on how
poorly the VM handles multiple simultaneour rsyncs, Maybe, just Maybe, a
poorly connected mirror might be limited by rsync protocol delays. To push
the 15 megbits/sec Alan got, you'd need something at least 3 times the
performance of my 486sx-25, which now a days isn't much.