
Solarflare
Server
Adapter
User
Guide
Solarflare
Adapters
on
Linux
Issue
20
©
Solarflare
Communications
2017
109
•
To
show
the
current
value
of
the
per
‐
adapter
LRO
state:
cat
/sys/class/net/ethX/device/lro
Modifying
this
file
instantly
enables
or
disables
LRO,
no
reboot
or
driver
reload
is
required.
This
setting
takes
precedence
over
the
lro
module
parameter
Current
LRO
settings
can
be
identified
with
Linux
ethtool
e.g.
ethtool
‐
k
ethX
TCP
and
IP
checksum
offloads
must
be
enabled
for
LRO
to
work.
TCP
Protocol
Tuning
TCP
Performance
can
also
be
improved
by
tuning
kernel
TCP
settings.
Settings
include
adjusting
send
and
receive
buffer
sizes,
connection
backlog,
congestion
control,
etc.
For
Linux
kernel
versions,
including
2.6.16
and
later,
initial
buffering
settings
should
provide
good
performance.
However
for
earlier
kernel
versions,
and
for
certain
applications
even
on
later
kernels,
tuning
buffer
settings
can
significantly
benefit
throughput.
To
change
buffer
settings,
adjust
the
tcp_rmem
and
tcp_wmem
using
the
sysctl
command:
•
Receive
buffering:
sysctl
net.ipv4.tcp_rmem="<min>
<default>
<max>"
•
Transmit
buffering:
sysctl
net.ipv4.tcp_wmem="<min>
<default>
<max>"
(
tcp_rmem
and
tcp_wmem
can
also
be
adjusted
for
IPV6
and
globally
with
the
net.ipv6
and
net.core
variable
prefixes
respectively).
Typically
it
is
sufficient
to
tune
just
the
max
buffer
value.
It
defines
the
largest
size
the
buffer
can
grow
to.
Suggested
alternate
values
are
max=500000
(1/2
Mbyte).
Factors
such
as
link
latency,
packet
loss
and
CPU
cache
size
all
influence
the
affect
of
the
max
buffer
size
values.
The
minimum
and
default
values
can
be
left
at
their
defaults
minimum=4096
and
default=87380.
Buffer
Allocation
Method
The
Solarflare
driver
has
a
single
optimized
buffer
allocation
strategy.
This
replaces
the
two
different
methods
controlled
with
the
rx_alloc_method
driver
module
parameter
which
were
available
using
3.3
and
previous
drivers.
The
net
driver
continues
to
expose
the
rx_alloc_method
module
option,
but
the
value
is
ignored
and
it
only
exists
to
not
break
existing
customer
configurations.