qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] net: set a default value for sndbuf=


From: Herbert Xu
Subject: [Qemu-devel] Re: [PATCH] net: set a default value for sndbuf=
Date: Tue, 30 Jun 2009 17:11:56 +0800
User-agent: Mutt/1.5.18 (2008-05-17)

On Tue, Jun 30, 2009 at 10:02:57AM +0100, Mark McLoughlin wrote:
> On reflection, perhaps it does make sense to set a default value for
> the sndbuf= tap parameter.
> 
> For best effect, sndbuf= should be set to just below the capacity of
> the physical NIC.
> 
> Setting it higher will cause packets to be dropped before the limit
> is hit. Setting it much lower will not cause any problems unless
> you set it low enough such that the guest cannot queue up new packets
> before the NIC has emptied its queue.
> 
> In Linux, txqueuelen=1000 by default for ethernet NICs. Given a 1500
> byte MTU, 1Mb is a good choice for sndbuf.

You mean 1MB :)

> If it turns out that txqueuelen is actually much lower than this, then
> sndbuf is essentially disabled. In the event that txqueuelen is much
> higher, it's unlikely that the NIC will be able to empty a 1Mb queue.
> 
> Thanks to Herbert Xu for this logic.
> 
> Signed-off-by: Mark McLoughlin <address@hidden>
> Cc: Herbert Xu <address@hidden>

Looks good to me!

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <address@hidden>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]