blah deblah wrote:

I've made myself a slackware 10.2 uml virtual machine
using the kernel. I've configured it to use
slirp for networking. My problem is that the upload
speed from the virtual machine seems to be capped at
46KB/s. For example if I use scp to put a file onto
the machine I will get about 2MB/s, but if I use scp
to get a file from the machine I get about 46KB/s. But
if I run several instances of scp getting files from
the virtual machine, all get about 46KB/s each. Any
ideas what's going on? Why isn't it allocating all
available bandwidth between the connections?

I had exactly the same problem these days and stumbled over this old posting while investigating.

I found the explanation and the solution finally:

The slirp utility defers the TCP ACK for 200 milliseconds (which may be a good idea on a slow modem connection, but not in an UML environment).

This limits the throughput to something around 9000 bytes (the TCP window size) in 0.2 seconds, leading to something around 45 or 46 kBytes per second.

The solution is a very small patch to slirp to send out the ACK immediatly. Now I have also full speed when sending data from the UML guest to the host! :-)
--- slirp-1.0.17/src/tcp_input.c	2004-09-01 09:36:44.000000000 +0200
+++ slirp-1.0.17-mh/src/tcp_input.c	2011-06-25 15:07:53.000000000 +0200
@@ -598,6 +598,10 @@
  *			    ((so->so_iptos & IPTOS_LOWDELAY) && 
  *			     ((struct tcpiphdr_2 *)ti)->first_char == (char)27)) {
+#ifdef FULL_BOLT
+			tp->t_flags |= TF_ACKNOW;
+			tcp_output(tp);
 			if ((unsigned)ti->ti_len == 1 &&
 			    ((struct tcpiphdr_2 *)ti)->first_char == (char)27) {
 				tp->t_flags |= TF_ACKNOW;
@@ -605,6 +609,7 @@
 			} else {
 				tp->t_flags |= TF_DELACK;
 	} /* header prediction */
All the data continuously generated in your IT infrastructure contains a 
definitive record of customers, application performance, security 
threats, fraudulent activity and more. Splunk takes this data and makes 
sense of it. Business sense. IT sense. Common sense..
User-mode-linux-user mailing list

Reply via email to