Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nacos on windows10 High cpu #1936

Closed
jasonhui512 opened this issue Oct 15, 2019 · 5 comments
Closed

nacos on windows10 High cpu #1936

jasonhui512 opened this issue Oct 15, 2019 · 5 comments
Labels
help wanted Extra attention is needed kind/performance Performance improvement is needed os/windows

Comments

@jasonhui512
Copy link

Issue Description
just start up nacos,after sometime it will cost Hign cpu, like 98%,
some stack log:
"New I/O worker #6" #99 daemon prio=5 os_prio=0 tid=0x0000000023f85800 nid=0x3514 runnable [0x000000002e97e000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.WindowsSelectorImpl.resetWakeupSocket0(Native Method)
at sun.nio.ch.WindowsSelectorImpl.resetWakeupSocket(WindowsSelectorImpl.java:473)
- locked <0x00000006c3903b58> (a java.lang.Object)
at sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:174)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
- locked <0x00000006c3900568> (a sun.nio.ch.Util$2)
- locked <0x00000006c3900558> (a java.util.Collections$UnmodifiableSet)
- locked <0x00000006c3900408> (a sun.nio.ch.WindowsSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
at org.jboss.netty.channel.socket.nio.SelectorUtil.select(SelectorUtil.java:64)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.select(AbstractNioSelector.java:409)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:206)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Locked ownable synchronizers:
- <0x00000006c39000d0> (a java.util.concurrent.ThreadPoolExecutor$Worker)

Tell us your environment

windows10 nacos V1.0.1, also nacos V1.1.3

@nkorange
Copy link
Collaborator

This problem is possibly triggered by nio version:
https://stackoverflow.com/questions/36284833/spring-boot-application-starts-using-all-cpu

We can have a try and see what happens:
https://my.oschina.net/u/252181/blog/832562

@jasonhui512
Copy link
Author

I just start nacos, why modify tomcat conf?

@Rebellioncry
Copy link

Rebellioncry commented Apr 7, 2020

Hello @nkorange ,I have a similar problem.In cluster mode, each Nacos server uses about 4% CPU and 10% mem,Is this normal? Can I lower the occupancy?If it's a NiO problem, have you fixed it?My nacos version is 1.2.1,run in docker 19+.

@KomachiSion KomachiSion modified the milestones: 1.3.0, 1.3.1 Jun 10, 2020
@KomachiSion KomachiSion removed this from the 1.3.1 milestone Jun 28, 2020
@KomachiSion KomachiSion added the kind/question Category issues related to questions or problems label Jun 28, 2020
@KomachiSion KomachiSion added os/windows kind/performance Performance improvement is needed help wanted Extra attention is needed and removed kind/question Category issues related to questions or problems labels Jul 21, 2020
@xugcheng
Copy link

image
CPU占用很高的两个线程

@KomachiSion
Copy link
Collaborator

#3903 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed kind/performance Performance improvement is needed os/windows
Projects
None yet
Development

No branches or pull requests

5 participants