To enable spinning in Onload:
Set EF_POLL_USEC. This causes Onload to spin on the processor for up to the specified number of microseconds before blocking. This setting is used in TCP and UDP and also in recv()
, select()
, pselect()
and poll()
, ppoll()
and epoll_wait()
, epoll_pwait()
and onload_ordered_epoll_wait()
. Use the following command:
export EF_POLL_USEC=100000
Note: If neither of the spinning options EF_POLL_USEC and EF_SPIN_USEC are set, Onload will resort to default interrupt driven behavior because the EF_INT_DRIVEN environment variable is enabled by default.
Setting the EF_POLL_USEC variable also sets the following environment variables.
EF_SPIN_USEC=EF_POLL_USEC
EF_SELECT_SPIN=1
EF_EPOLL_SPIN=1
EF_POLL_SPIN=1
EF_PKT_WAIT_SPIN=1
EF_TCP_SEND_SPIN=1
EF_UDP_RECV_SPIN=1
EF_UDP_SEND_SPIN=1
EF_TCP_RECV_SPIN=1
EF_BUZZ_USEC=MIN(EF_POLL_USEC, 100)
EF_SOCK_LOCK_BUZZ=1
EF_STACK_LOCK_BUZZ=1
Turn off adaptive moderation and set interrupt moderation to a high value (microseconds) to avoid flooding the system with interrupts. Use the following command:
/sbin/ethtool -C eth2 rx-usecs 60 adaptive-rx off
See Meta Options for more details.