Page 1 of 1

Gigabit Network slower than expected

Posted: 3. Sep 2009, 12:15
by ribx
Hi,

i have the following setup:

Gentoo Linux Host with all Hardware virtualisations enabled
Windows Small Business Server 2003 Guest
There are 2 network cards onboard, one for the linux, the other one bridged to windows.

The hardware virtualisation is fantastic. I have nearly the same speed as on real hardware. the only thing that is missing is the network. i have a 1Gb network card and test it with jperf. direct on the host i get around 400 Mb/s (92 Mb/s on 100Mbit) from a windows client over a direct cable connection (a cat6 cable). when i make the test with the windows host responding on that connection i get 105 Mb/s (70Mb/s on 100Mbit). where could be the problem? btw the host has a Q6700 processor and 4GB ram (where 2.5 belongs to the windows guest). I thought the bridged connection doesnt emulate anithing and produces no overhead?

is also tried to install original drivers from intel but that doesnt changed anything.

regards
-ribx
 Edit:  i just booted a linux life cd and tested again. got there 200 Mb/s. i will try another driver now. cross your fingers. i have no clue what to do next. maybe i test with nated network, just to have something to compare (nat is not a posibility) 

Re: Gigabit Network slower than expected

Posted: 3. Sep 2009, 19:00
by ribx
i tried now everything you could imagine. with nated network i have higher peaks of transportation but the same overallspeed. (and it wouldnt be a possibility anyway).

so what i now want to know: is it possible to have an higher speed with an windows 2003 client? or is ~120 Mb/s most that the emulation can do?

btw, i check the processor and everything, nothing goes to the limit. i have no clue where my network is slowed down. i guess i will give up.

regards
-ribx

Re: Gigabit Network slower than expected

Posted: 3. Sep 2009, 19:48
by Sasquatch
Maybe the NIC is running in 100 Mbps mode. Check the device settings, force it to gig lan if needed.

Re: Gigabit Network slower than expected

Posted: 3. Sep 2009, 21:45
by ribx
no, there is not such a simple solution. i am working on this now for 8 hours and what i have now is writing to the guest over the network goes only with 8MB/s (64 MBit/s) but reading with 40MB/s (312MBit/s). reading/writing on the host direcly (over the direct cable connection) works with 80/74 MB/s ( 617/570 MBit/s ). i have no clue were the mistake could be and i am wondering why i am the only one with such problems.

-ribx

Re: Gigabit Network slower than expected

Posted: 4. Sep 2009, 00:38
by Sasquatch
Is the write to the hard drive itself (in the VM)? If so, do you have an antivirus on the Host and Guest running? Is the VDI dynamic or fixed size? All these things can slow it down. With dynamic, it needs to allocate the physical hard drive space as it gets the data, add an antivirus app with real-time on-access scanning and it can slow down to less than 100 Mbps.

Re: Gigabit Network slower than expected

Posted: 4. Sep 2009, 08:28
by ribx
writing to a samba share from a lifecd (so writing to tmpfs) runns with 46/16 MB/s reading/writing. way better but still too far from the host direct (80/74) IMHO (especially writing).

Re: Gigabit Network slower than expected

Posted: 4. Sep 2009, 12:13
by ribx
i have the feeling it is related to this:

Code: Select all

root@sysresccd /root % dd if=/tmp/test.dat of=/dev/null
204800+0 records in
204800+0 records out
104857600 bytes (105 MB) copied, 5.39587 s, 19.4 MB/s
note that this is a life cd and /tmp is a tmpfs (a filesystem in the system ram) :!: do you have any clue what could cause this?

should have a speed of about 1 GB/s minimum.

and i fixed some hard disk perfomance problems by changing to sata controler (hopefully the window will not have too much problems with it...)

regards

btw: thanks alot for your help and patience

Re: Gigabit Network slower than expected

Posted: 4. Sep 2009, 17:41
by ribx
its looks like the write speed to my harddisc is responsible. the speed is the same as when writing from the network, same is for reading. so i was searching in the wrong place (the old benchmark i used seems to gave me wrong results, maybe buffered, dunno, now i use sisoft's sandra)

this happens althought i cheanged to the sata controller and udma6 is used. my vdi file is on a separate partition, the size is fixed. what else can i do, to speed it up?

Re: Gigabit Network slower than expected

Posted: 4. Sep 2009, 19:40
by Sasquatch
Get a faster hard drive on the Host? It seems that VB relies for these kinds of benchmarks on the hard drive speed. I already found it strange that you were able to get 80 MB/s through your giglan adapter for hard drive writing. When I transfer data from one hard drive to another, internally, I get around 60 MB/s. When I transfer some data from my Host to my laptop, I get around 30 MB/s (laptop hard drive is SATA1 and 5400 rpm). Another hard drive in my computer (now out of order) used to get 25 MB/s at most (was an IDE drive). So, your average of 20 is not too bad.

Re: Gigabit Network slower than expected

Posted: 7. Sep 2009, 16:37
by ribx
no, its not the harddisc, which makes easily 70 MB/s on the host. the problem is that i have 100% processor when i write something onto the disc. when i turn on hardware virtualization its faster, but still limited through the cpu, which is 100%.

i guess now is that the resulting network speed is a combination of cpu need for hd writing and for the network (cpu is also 100% when i use jperf to check the speed, which is then, without writing much higher (355 Mbit/s))

Re: Gigabit Network slower than expected

Posted: 7. Sep 2009, 18:30
by ribx
now i work with 100MBit/s connection and the result is:

over the network to the host (to eth0) from a windows client: 10/10 MB/s read/write
and to the guest over eth1: 6,5/6 read/write, where the guest has 95-100% processor while reading/writing

sounds for me like no dma for both devices or something. how can i check that nested pages are working? can i see it in the log file?