netisr process eats 100% cpu
hiren panchasara
hiren at strugglingcoder.info
Fri Sep 11 17:19:17 UTC 2015
On 09/11/15 at 12:46P, Dmitry Sivachenko wrote:
>
> > hiren panchasara <hiren at strugglingcoder.info> wrote:
> >
> > Unsure at the moment if loopback is causing the trouble for you or not.
> > See:
>
> (please keep me CC'ed, I am not subscribed to -net)
>
>
> >
> > https://lists.freebsd.org/pipermail/freebsd-net/2015-February/041239.html
> >
> >
>
> Yes, this thread looks similar.
>
>
> > You may want to try:
> > 1) pmcstat and see if you can catch something
>
> What particular should I look for? Here is first lines of pmcstat -T -S instructions -w 1:
> PMC: [INSTR_RETIRED_ANY] Samples: 157198 (100.0%) , 0 unresolved
>
> %SAMP IMAGE FUNCTION CALLERS
> 13.2 kernel cpu_search_highest cpu_search_highest:12.0 sched_idletd:1.2
> 8.3 kernel ipfw_chk ipfw_check_packet
> 3.1 myprogram memsetAVX _ZN12TLz4Compress7DoWriteEPKv
> 2.3 kernel tcp_output tcp_usr_send:1.0 tcp_do_segment:0.9
>
>
> > 2) disable checksum on localhost
>
>
> I tried, but nothing has changed.
>
>
> > 3) look at netisr settings. sysctl net.isr o/p and how it looks under
> > netstat -Q. I am not sure if adding more threads to netisr via
>
>
> What should I look for?
>
>
> > net.isr.numthreads would help. (Note its a loader.conf variable)
>
>
> This netisr load looks parasitical to me (as I noted, moving haproxy to a separate machine does not burn CPU cycles on netisr, why is localhost special?)
>
> Even if adding more threads to netisr would boost network utilization, wouldn't those CPU cycles spent for netisr just be a waste of energy? I have other tasks for these CPU.
>
I am not sure what keep cpu busy with netisr when localhost is involved.
You may want to post o/p of
# sysctl net.isr
# netstat -Q
# sysctl net.inet | grep queue
A suggestion I see at https://calomel.org/freebsd_network_tuning.html is
to increase localhost n/w buffers. Not sure if this'll help your case.
net.local.stream.sendspace=164240 # (default 8192)
net.local.stream.recvspace=164240 # (default 8192)
Now I'll let someone else with more ideas/clues comment.
Cheers,
Hiren
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 603 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20150911/a7a4a614/attachment.bin>
More information about the freebsd-net
mailing list