Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Slow mode: (2 Items)
   
Slow mode  
Hi,

There is a QNet option "slow_mode=X". Could someone provide a brief explanation what does it mean and what are effects 
of it? I've been ignoring it for long time but after all, I need some info to make a decision for myself whether that 
should be enabled or not.

Thanks in advance.
RE: Slow mode  
If everything is working as advertised, you should
never encounter (or need) "slow mode" in qnet.

The data transfer protocol in lwl4 qnet, like me
on a Saturday night, is very optimistic.  If the L4
is passed a request by the kernel to transfer, say
10K bytes of data, there is no "window" - the L4
allocates packets (either npkts with io-net, or
mbufs with io-pkt, all same same) and passes them
down to the driver as fast as it can.

Most of the time, this works pretty darned well,
and delivers very good performance - the window
is infinitely large as far as the L4 is concerned.

However, if the network hardware being used does
not support DMA rings (eg some low-budget relic 
from the 1970's that tries to buffer the packets 
on-chip) it may lose packets - especially during
rx - if the burst is too big.

This problem gets worse when a low-speed cpu
is used - or long scheduling latency is experienced - 
and the driver is unable to drain the rxd packets
out of the nic, before some are lost.

With the smc9000 (think mirrorball and bell-bottom
pants) I re-wrote it with two threads at different
priorities to try to work around this problem as
best I could with the hardware that I had.

For completeness I should mention that even DMA
ring-based nics can also suffer from this problem
with too small an rx ring, and not enough processor -
this is generally easily fixed with the "receive=2048"
option to the driver.

Anyways.  If you do the following:

  # cat /proc/qnetstats | grep slow

and you get all zeroes, it's not a problem for you.

Bottom line is that, for best performance, you should
try to configure stuff so that you don't lose ANY packets.

Only when you experience heavy packet loss, will qnet
go into "slow mode" and window packet transmissions
(eg limit burst size).

Note that qnet will optimistically (remember Saturday night)
try to gradually open up the window and eventually go
out of slow mode.

You can see all this stuff in sloginfo.  It's a bit like
watching the golf channel, except nothing is green - not
even the alien women!

--
aboyd