Forum Stats

  • 3,854,665 Users
  • 2,264,397 Discussions
  • 7,905,749 Comments

Discussions

epollwait cpu high

3fc721cc-7a39-4bb4-bf7c-a9c0b80aeae8
edited Mar 24, 2016 6:04AM in Networking

environment:jdk8,linux 2.6.32

using httpasyncclient post urls,but cpu 60% when qps is small

strace:

5086 14:12:16.474191 [ 3b100e7c73] epoll_wait(694, <unfinished ...><br/>  5086 14:12:16.475135 [ 3b100e7c73] <... epoll_wait resumed> {{EPOLLIN, {u32=611, u64=6488932609085669987}}}, 8192, 250) = 1<br/>  5086 14:12:16.476076 [ 3b1040e54d] read(611, <unfinished ...><br/>  5086 14:12:16.476944 [ 3b1040e54d] <... read resumed> "\1", 128) = 1<br/>  5086 14:12:16.477801 [ 3b100e7c73] epoll_wait(694, <unfinished ...><br/>  5117 14:12:16.508612 [ 3b1040e4ed] <... write resumed> ) = 1<br/>  5086 14:12:16.524133 [ 3b100e7c73] <... epoll_wait resumed> {{EPOLLIN, {u32=3105, u64=5407512289798523937}}}, 8192, 250) = 1<br/>  5086 14:12:16.525211 [ 3b1040e54d] read(3105, <unfinished ...><br/>  5086 14:12:16.526321 [ 3b1040e54d] <... read resumed> "\26\3\3\0]\2\0\0Y\3\3s\353\367\371\35\375\203Y\266\261\35v)\210w\227\251\344U=\316"..., 16921) = 3766<br/>  5086 14:12:16.536247 [ 3b1040e4ed] write(673, "\1", 1 <unfinished ...><br/>  5086 14:12:16.537102 [ 3b1040e4ed] <... write resumed> ) = 1<br/>  5086 14:12:16.538055 [ 3b100e7c1a] epoll_ctl(694, EPOLL_CTL_MOD, 3105, {EPOLLIN|EPOLLOUT, {u32=3105, u64=5407512289798523937}} <unfinished ...><br/>  5086 14:12:16.538947 [ 3b100e7c1a] <... epoll_ctl resumed> ) = 0<br/>  5086 14:12:16.539916 [ 3b100e7c73] epoll_wait(694, <unfinished ...><br/>  5086 14:12:16.540829 [ 3b100e7c73] <... epoll_wait resumed> {{EPOLLOUT, {u32=3105, u64=5407512289798523937}}, {EPOLLIN, {u32=611, u64=6488932609085669987}}}, 8192, 250) = 2<br/>  5086 14:12:16.541722 [ 3b1040e54d] read(611, <unfinished ...><br/>  5086 14:12:16.542543 [ 3b1040e54d] <... read resumed> "\1", 128) = 1<br/>  5086 14:12:16.543355 [ 3b1040e4ed] write(3105, "\26\3\3\0F\20\0\0BA\4I\371\377\256\37\314\266g#\242\t\20\2224r2\2\224|H\267"..., 75 <unfinished ...><br/>  5086 14:12:16.544160 [ 3b1040e4ed] <... write resumed> ) = 75<br/>  5086 14:12:16.545019 [ 3b100e7c73] epoll_wait(694, <unfinished ...><br/>  5086 14:12:16.545929 [ 3b100e7c73] <... epoll_wait resumed> {{EPOLLOUT, {u32=3105, u64=5407512289798523937}}}, 8192, 250) = 1<br/>  5086 14:12:16.546864 [ 3b1040e4ed] write(3105, "\24\3\3\0\1\1", 6 <unfinished ...><br/>  5086 14:12:16.547878 [ 3b1040e4ed] <... write resumed> ) = 6<br/>  5086 14:12:16.548843 [ 3b100e7c73] epoll_wait(694, <unfinished ...><br/>  5086 14:12:16.549803 [ 3b100e7c73] <... epoll_wait resumed> {{EPOLLOUT, {u32=3105, u64=5407512289798523937}}}, 8192, 250) = 1

stack:

"I/O dispatcher 334" #617 prio=5 os_prio=0 tid=0x00007f2b48bfc000 nid=0x13e2 runnable [0x00007f2adc2f9000]<br/>  java.lang.Thread.State: RUNNABLE<br/>  at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)<br/>  at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)<br/>  at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:79)<br/>  at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)<br/>  - locked <0x000000077328e888> (a sun.nio.ch.Util$2)<br/>  - locked <0x000000077328e8d0> (a java.util.Collections$UnmodifiableSet)<br/>  - locked <0x0000000772c6f998> (a sun.nio.ch.EPollSelectorImpl)<br/>  at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)<br/>  at org.apache.http.impl.nio.reactor.AbstractIOReactor.isBreak(AbstractIOReactor.java:312)<br/>  at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:258)<br/>  at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:106)<br/>  at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:604)<br/>  at java.lang.Thread.run(Thread.java:756)

and some

  5066 14:12:17.165757 [ 3b1040e54d] <... read resumed> 0x7f2acffb8f80, 16714) = -1 EAGAIN (Resource temporarily unavailable)<br/>  5097 14:12:17.169114 [ 3b1040e54d] <... read resumed> 0x7f2b19a6bf80, 16714) = -1 EAGAIN (Resource temporarily unavailable)<br/>  5082 14:12:17.171417 [ 3b1040e54d] <... read resumed> 0x7f2b1c452080, 16642) = -1 EAGAIN (Resource temporarily unavailable)<br/>  5082 14:12:17.179253 [ 3b1040e54d] <... read resumed> 0x7f2b1c452080, 16642) = -1 EAGAIN (Resource temporarily unavailable)<br/>  5082 14:12:17.183714 [ 3b1040e54d] <... read resumed> 0x7f2b1c452080, 16642) = -1 EAGAIN (Resource temporarily unavailable)<br/>  5082 14:12:17.189796 [ 3b1040e54d] <... read resumed> 0x7f2b1c452080, 16642) = -1 EAGAIN (Resource temporarily unavailable)

can anyone help me ? thanks

This discussion has been closed.