Skip to main content

100% CPU on tcp request

6 replies [Last post]
alexkaidalov
Offline
Joined: 2007-07-16
Points: 0

Hello,

Has anybody mentioned that if run just edge(relay, rdv doesnt matter) peer with tcp incoming set to true, i.e. it listens on 9701 for example. And do several
http://localhost:9701 requests from a browser(similar test could be done simply open and close sockets on 9701 from other app to that peer). Then CPU suddenly jumps to 100% and lasts several seconds. I tested it with WinXp, Solaris, Linux, all the same. I use jxta 2.5.

I wander, whether it's known problem in community already. Any fixes for that known also?

thanks in advance for any help
Aleks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
alexkaidalov
Offline
Joined: 2007-07-16
Points: 0

I used top , vmstat on linux,
mpstat on solaris
windows taskmanager on windows,

btw, is it reproducable on your side as well ?

alexkaidalov
Offline
Joined: 2007-07-16
Points: 0

Hello, Thanks for answering, but i wander why just by waiting on read() from socket i should consume cpu 100%?

hamada
Offline
Joined: 2003-06-12
Points: 0

It is normal to see profiler cpu consuming 100% on blocked read or write. It is not normal however to see 100% cpu when using system level profiling tools.

Which method are you referring to?

alexkaidalov
Offline
Joined: 2007-07-16
Points: 0

thanks Hamada for reply,

Yes, i can reproduce, and took screenshoot for you. Attached to the message.
From it you can see that WelcomeMessage consumes all cpu.
BTW, have you tried on your side to get same result?

thanks
Aleks

hamada
Offline
Joined: 2003-06-12
Points: 0

This is what I expected. Most of the time is spent trying to process the expected welcome message which will never occur, as the test does not conform the JXTA protocols. Therefore the test will expend the system resources on connections which aren't related to JXTA.

This attack like scenario can be overcome by reducing socket read/write timeout to a lower value than what the default is.

As for testing, I advice that you use JxtaSink for the purposes of scalability and capacity planning.

hamada
Offline
Joined: 2003-06-12
Points: 0

can you reproduce it while running a profiler to determine what consuming the cpu power?