gpt4 book ai didi

java - Neo4j java 高 cpu 使用率仍然是 392%

转载 作者:行者123 更新时间:2023-11-30 07:54:00 25 4
gpt4 key购买 nike

我在 Linux 机器上运行 neo4j 服务器 16Gb RAM 和 4 个内核,我的数据库中的节点总数是 342860,关系总数是 1647619,我正在尝试调试问题所以我已经停止了所有与 neo4j 相关的处理(读和写)。

但是 neo4j java 进程的 CPU 使用率仍然是 400%,100/核心,因为我有 4 个核心。

由于字符数限制,我无法在此处粘贴整个日志,因此我在评论中添加了 pastebin url。

我尝试使用 jstack 查看 java 进程的堆栈,以下是它的日志

Attaching to process ID 8458, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.111-b14
Deadlock Detection:

No deadlocks found.

Thread 8536: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20, line=215 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=78, line=2078 (Compiled frame)
- org.eclipse.jetty.util.BlockingArrayQueue.poll(long, java.util.concurrent.TimeUnit) @bci=57, line=389 (Interpreted frame)
- org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll() @bci=12, line=531 (Interpreted frame)
- org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(org.eclipse.jetty.util.thread.QueuedThreadPool) @bci=1, line=47 (Interpreted frame)
- org.eclipse.jetty.util.thread.QueuedThreadPool$3.run() @bci=300, line=590 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)


Thread 8531: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20, line=215 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=78, line=2078 (Compiled frame)
- java.util.concurrent.ArrayBlockingQueue.poll(long, java.util.concurrent.TimeUnit) @bci=49, line=418 (Interpreted frame)
- org.neo4j.bolt.v1.runtime.concurrent.RunnableBoltWorker.run() @bci=28, line=88 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)



Thread 8529: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20, line=215 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=78, line=2078 (Compiled frame)
- java.util.concurrent.ArrayBlockingQueue.poll(long, java.util.concurrent.TimeUnit) @bci=49, line=418 (Interpreted frame)
- org.neo4j.bolt.v1.runtime.concurrent.RunnableBoltWorker.run() @bci=28, line=88 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)


Thread 8525: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20, line=215 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=78, line=2078 (Compiled frame)
- java.util.concurrent.ArrayBlockingQueue.poll(long, java.util.concurrent.TimeUnit) @bci=49, line=418 (Interpreted frame)
- org.neo4j.bolt.v1.runtime.concurrent.RunnableBoltWorker.run() @bci=28, line=88 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)



Thread 8510: (state = BLOCKED)
- java.lang.Thread.sleep(long) @bci=0 (Interpreted frame)
- io.netty.util.ThreadDeathWatcher$Watcher.run() @bci=19, line=152 (Interpreted frame)
- io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run() @bci=4, line=144 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)


Thread 8509: (state = IN_NATIVE)
- sun.nio.ch.EPollArrayWrapper.epollWait(long, int, long, int) @bci=0 (Compiled frame; information may be imprecise)
- sun.nio.ch.EPollArrayWrapper.poll(long) @bci=18, line=269 (Compiled frame)
- sun.nio.ch.EPollSelectorImpl.doSelect(long) @bci=28, line=93 (Compiled frame)
- sun.nio.ch.SelectorImpl.lockAndDoSelect(long) @bci=37, line=86 (Compiled frame)
- sun.nio.ch.SelectorImpl.select(long) @bci=30, line=97 (Compiled frame)
- io.netty.channel.nio.NioEventLoop.select(boolean) @bci=91, line=746 (Compiled frame)
- io.netty.channel.nio.NioEventLoop.run() @bci=56, line=391 (Interpreted frame)
- io.netty.util.concurrent.SingleThreadEventExecutor$5.run() @bci=44, line=858 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)


Thread 8507: (state = IN_JAVA)
Error occurred during stack walking:
java.lang.NullPointerException
at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:88)
at sun.jvm.hotspot.tools.StackTrace.run(StackTrace.java:45)
at sun.jvm.hotspot.tools.JStack.run(JStack.java:66)
at sun.jvm.hotspot.tools.Tool.startInternal(Tool.java:260)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:223)
at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
at sun.jvm.hotspot.tools.JStack.main(JStack.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.tools.jstack.JStack.runJStackTool(JStack.java:140)
at sun.tools.jstack.JStack.main(JStack.java:106)


Thread 8506: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20, line=215 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=78, line=2078 (Compiled frame)
- org.eclipse.jetty.util.BlockingArrayQueue.poll(long, java.util.concurrent.TimeUnit) @bci=57, line=389 (Interpreted frame)
- org.eclipse.jetty.util.thread.QueuedThreadPool.idleJobPoll() @bci=12, line=531 (Interpreted frame)
- org.eclipse.jetty.util.thread.QueuedThreadPool.access$700(org.eclipse.jetty.util.thread.QueuedThreadPool) @bci=1, line=47 (Interpreted frame)
- org.eclipse.jetty.util.thread.QueuedThreadPool$3.run() @bci=300, line=590 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)


Thread 8504: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20, line=215 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=78, line=2078 (Compiled frame)
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=124, line=1093 (Interpreted frame)
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=1, line=809 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)


Thread 8463: (state = BLOCKED)


Thread 8503: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20, line=215 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=78, line=2078 (Compiled frame)
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=124, line=1093 (Interpreted frame)
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=1, line=809 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)


Thread 8502: (state = IN_JAVA)
- org.neo4j.kernel.impl.api.store.StoreNodeRelationshipCursor.next() @bci=662, line=168 (Compiled frame; information may be imprecise)
- org.neo4j.kernel.impl.api.store.CursorRelationshipIterator.nextCursor() @bci=11, line=52 (Compiled frame)
- org.neo4j.kernel.impl.api.store.CursorRelationshipIterator.hasNext() @bci=9, line=67 (Compiled frame)
- org.neo4j.cypher.internal.spi.BeansAPIRelationshipIterator.hasNext() @bci=4, line=41 (Compiled frame)
- org.neo4j.cypher.internal.compiler.v3_2.pipes.CachingExpandInto$$anon$1.fetchNextOrNull() @bci=4, line=95 (Compiled frame)
- org.neo4j.cypher.internal.compiler.v3_2.pipes.CachingExpandInto$$anon$1.fetchNextOrNull() @bci=1, line=90 (Compiled frame)
- org.neo4j.helpers.collection.PrefetchingIterator.peek() @bci=14, line=60 (Compiled frame)
- org.neo4j.helpers.collection.PrefetchingIterator.hasNext() @bci=1, line=46 (Compiled frame)
- scala.collection.convert.Wrappers$JIteratorWrapper.hasNext() @bci=4, line=42 (Compiled frame)
- scala.collection.Iterator$class.isEmpty(scala.collection.Iterator) @bci=1, line=330 (Compiled frame)
- scala.collection.AbstractIterator.isEmpty() @bci=1, line=1336 (Compiled frame)
- org.neo4j.cypher.internal.compiler.v3_2.pipes.ExpandIntoPipe$$anonfun$internalCreateResults$1.apply(org.neo4j.cypher.internal.compiler.v3_2.ExecutionContext) @bci=99, line=64 (Compiled frame)
- org.neo4j.cypher.internal.compiler.v3_2.pipes.ExpandIntoPipe$$anonfun$internalCreateResults$1.apply(java.lang.Object) @bci=5, line=53 (Compiled frame)
- scala.collection.Iterator$$anon$12.nextCur() @bci=14, line=434 (Compiled frame)
- scala.collection.Iterator$$anon$12.hasNext() @bci=27, line=440 (Compiled frame)
- scala.collection.Iterator$class.isEmpty(scala.collection.Iterator) @bci=1, line=330 (Compiled frame)
- scala.collection.AbstractIterator.isEmpty() @bci=1, line=1336 (Compiled frame)
- org.neo4j.cypher.internal.compiler.v3_2.pipes.SemiApplyPipe$$anonfun$internalCreateResults$1.apply(org.neo4j.cypher.internal.compiler.v3_2.ExecutionContext) @bci=34, line=34 (Compiled frame)
- org.neo4j.cypher.internal.compiler.v3_2.pipes.SemiApplyPipe$$anonfun$internalCreateResults$1.apply(java.lang.Object) @bci=5, line=31 (Compiled frame)
- scala.collection.Iterator$$anon$13.hasNext() @bci=40, line=463 (Compiled frame)
- scala.collection.Iterator$$anon$13.hasNext() @bci=11, line=461 (Compiled frame)
- scala.collection.Iterator$class.foreach(scala.collection.Iterator, scala.Function1) @bci=1, line=893 (Compiled frame)
- scala.collection.AbstractIterator.foreach(scala.Function1) @bci=2, line=1336 (Compiled frame)
- org.neo4j.cypher.internal.compiler.v3_2.pipes.EagerAggregationPipe.internalCreateResults(scala.collection.Iterator, org.neo4j.cypher.internal.compiler.v3_2.pipes.QueryState) @bci=78, line=89 (Interpreted frame)
- org.neo4j.cypher.internal.compiler.v3_2.pipes.PipeWithSource.createResults(org.neo4j.cypher.internal.compiler.v3_2.pipes.QueryState) @bci=26, line=82 (Interpreted frame)
- org.neo4j.cypher.internal.compiler.v3_2.pipes.PipeWithSource.createResults(org.neo4j.cypher.internal.compiler.v3_2.pipes.QueryState) @bci=5, line=79 (Interpreted frame)
- org.neo4j.cypher.internal.compiler.v3_2.pipes.PipeWithSource.createResults(org.neo4j.cypher.internal.compiler.v3_2.pipes.QueryState) @bci=5, line=79 (Interpreted frame)
- org.neo4j.cypher.internal.compiler.v3_2.pipes.PipeWithSource.createResults(org.neo4j.cypher.internal.compiler.v3_2.pipes.QueryState) @bci=5, line=79 (Interpreted frame)
- org.neo4j.cypher.internal.compiler.v3_2.pipes.PipeWithSource.createResults(org.neo4j.cypher.internal.compiler.v3_2.pipes.QueryState) @bci=5, line=79 (Interpreted frame)
- org.neo4j.cypher.internal.compiler.v3_2.pipes.PipeWithSource.createResults(org.neo4j.cypher.internal.compiler.v3_2.pipes.QueryState) @bci=5, line=79 (Interpreted frame)
- org.neo4j.cypher.internal.compiler.v3_2.pipes.PipeWithSource.createResults(org.neo4j.cypher.internal.compiler.v3_2.pipes.QueryState) @bci=5, line=79 (Interpreted frame)
- org.neo4j.cypher.internal.compiler.v3_2.pipes.PipeWithSource.createResults(org.neo4j.cypher.internal.compiler.v3_2.pipes.QueryState) @bci=5, line=79 (Interpreted frame)
- org.neo4j.cypher.internal.compiler.v3_2.executionplan.DefaultExecutionResultBuilderFactory$ExecutionWorkflowBuilder.createResults(org.neo4j.cypher.internal.compiler.v3_2.pipes.QueryState, org.neo4j.cypher.internal.compiler.v3_2.ExecutionMode, org.neo4j.cypher.internal.frontend.v3_2.phases.InternalNotificationLogger) @bci=107, line=96 (Interpreted frame)
- org.neo4j.cypher.internal.compiler.v3_2.executionplan.DefaultExecutionResultBuilderFactory$ExecutionWorkflowBuilder.build(java.lang.Object, org.neo4j.cypher.internal.compiler.v3_2.ExecutionMode, scala.collection.immutable.Map, org.neo4j.cypher.internal.frontend.v3_2.phases.InternalNotificationLogger) @bci=138, line=74 (Interpreted frame)
- org.neo4j.cypher.internal.compiler.v3_2.BuildInterpretedExecutionPlan$$anonfun$getExecutionPlanFunction$1.apply(org.neo4j.cypher.internal.compiler.v3_2.spi.QueryContext, org.neo4j.cypher.internal.compiler.v3_2.ExecutionMode, scala.collection.immutable.Map) @bci=178, line=103 (Interpreted frame)
- org.neo4j.cypher.internal.compiler.v3_2.BuildInterpretedExecutionPlan$$anonfun$getExecutionPlanFunction$1.apply(java.lang.Object, java.lang.Object, java.lang.Object) @bci=13, line=86 (Interpreted frame)
- org.neo4j.cypher.internal.compiler.v3_2.BuildInterpretedExecutionPlan$$anon$1.run(org.neo4j.cypher.internal.compiler.v3_2.spi.QueryContext, org.neo4j.cypher.internal.compiler.v3_2.ExecutionMode, scala.collection.immutable.Map) @bci=7, line=55 (Interpreted frame)
- org.neo4j.cypher.internal.compatibility.v3_2.Compatibility$ExecutionPlanWrapper$$anonfun$run$1.apply() @bci=37, line=102 (Interpreted frame)
- org.neo4j.cypher.internal.compatibility.v3_2.Compatibility$ExecutionPlanWrapper$$anonfun$run$1.apply() @bci=1, line=100 (Interpreted frame)
- org.neo4j.cypher.internal.compatibility.v3_2.exceptionHandler$runSafely$.apply(scala.Function0, scala.Function1) @bci=1, line=90 (Interpreted frame)
- org.neo4j.cypher.internal.compatibility.v3_2.Compatibility$ExecutionPlanWrapper.run(org.neo4j.cypher.internal.spi.v3_2.TransactionalContextWrapper, org.neo4j.cypher.internal.CypherExecutionMode, scala.collection.immutable.Map) @bci=92, line=100 (Interpreted frame)
- org.neo4j.cypher.internal.PreparedPlanExecution.execute(org.neo4j.cypher.internal.spi.v3_2.TransactionalContextWrapper, scala.collection.immutable.Map) @bci=19, line=26 (Interpreted frame)
- org.neo4j.cypher.internal.ExecutionEngine.execute(java.lang.String, java.util.Map, org.neo4j.kernel.impl.query.TransactionalContext) @bci=85, line=107 (Interpreted frame)
- org.neo4j.cypher.internal.javacompat.ExecutionEngine.executeQuery(java.lang.String, java.util.Map, org.neo4j.kernel.impl.query.TransactionalContext) @bci=11, line=61 (Interpreted frame)
- org.neo4j.server.rest.transactional.TransactionHandle.safelyExecute(org.neo4j.server.rest.transactional.Statement, boolean, org.neo4j.kernel.impl.query.TransactionalContext) @bci=13, line=371 (Interpreted frame)
- org.neo4j.server.rest.transactional.TransactionHandle.executeStatements(org.neo4j.server.rest.transactional.StatementDeserializer, org.neo4j.server.rest.transactional.ExecutionResultSerializer, java.util.List, javax.servlet.http.HttpServletRequest) @bci=129, line=323 (Interpreted frame)
- org.neo4j.server.rest.transactional.TransactionHandle.commit(org.neo4j.server.rest.transactional.StatementDeserializer, org.neo4j.server.rest.transactional.ExecutionResultSerializer, javax.servlet.http.HttpServletRequest) @bci=53, line=157 (Interpreted frame)
- org.neo4j.server.rest.web.TransactionalService.lambda$executeStatementsAndCommit$1(org.neo4j.server.rest.transactional.TransactionHandle, java.io.InputStream, java.net.URI, javax.servlet.http.HttpServletRequest, java.io.OutputStream) @bci=47, line=217 (Interpreted frame)
- org.neo4j.server.rest.web.TransactionalService$$Lambda$300.write(java.io.OutputStream) @bci=21 (Interpreted frame)
- com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(javax.ws.rs.core.StreamingOutput, java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap, java.io.OutputStream) @bci=3, line=71 (Interpreted frame)
- com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(java.lang.Object, java.lang.Class, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap, java.io.OutputStream) @bci=15, line=57 (Interpreted frame)
- com.sun.jersey.spi.container.ContainerResponse.write() @bci=514, line=302 (Interpreted frame)
- com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(com.sun.jersey.server.impl.application.WebApplicationContext, com.sun.jersey.spi.container.ContainerRequest, com.sun.jersey.spi.container.ContainerResponse) @bci=234, line=1510 (Interpreted frame)
- com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(com.sun.jersey.spi.container.ContainerRequest, com.sun.jersey.spi.container.ContainerResponse) @bci=23, line=1419 (Interpreted frame)
- com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(com.sun.jersey.spi.container.ContainerRequest, com.sun.jersey.spi.container.ContainerResponseWriter) @bci=14, line=1409 (Interpreted frame)
- com.sun.jersey.spi.container.servlet.WebComponent.service(java.net.URI, java.net.URI, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=76, line=409 (Interpreted frame)
- com.sun.jersey.spi.container.servlet.ServletContainer.service(java.net.URI, java.net.URI, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=9, line=558 (Interpreted frame)
- com.sun.jersey.spi.container.servlet.ServletContainer.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=355, line=733 (Interpreted frame)
- javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=39, line=790 (Interpreted frame)
- org.eclipse.jetty.servlet.ServletHolder.handle(org.eclipse.jetty.server.Request, javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=89, line=808 (Interpreted frame)
- org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=211, line=1669 (Interpreted frame)
- org.neo4j.server.rest.dbms.AuthorizationEnabledFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=274, line=122 (Interpreted frame)
- org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=103, line=1652 (Interpreted frame)
- org.neo4j.server.rest.web.CollectUserAgentFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) @bci=54, line=69 (Interpreted frame)
- org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse) @bci=103, line=1652 (Interpreted frame)
- org.eclipse.jetty.servlet.ServletHandler.doHandle(java.lang.String, org.eclipse.jetty.server.Request, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=203, line=585 (Interpreted frame)
- org.eclipse.jetty.server.session.SessionHandler.doHandle(java.lang.String, org.eclipse.jetty.server.Request, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=46, line=221 (Interpreted frame)
- org.eclipse.jetty.server.handler.ContextHandler.doHandle(java.lang.String, org.eclipse.jetty.server.Request, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=349, line=1127 (Interpreted frame)
- org.eclipse.jetty.servlet.ServletHandler.doScope(java.lang.String, org.eclipse.jetty.server.Request, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=274, line=515 (Interpreted frame)
- org.eclipse.jetty.server.session.SessionHandler.doScope(java.lang.String, org.eclipse.jetty.server.Request, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=233, line=185 (Interpreted frame)
- org.eclipse.jetty.server.handler.ContextHandler.doScope(java.lang.String, org.eclipse.jetty.server.Request, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=437, line=1061 (Interpreted frame)
- org.eclipse.jetty.server.handler.ScopedHandler.handle(java.lang.String, org.eclipse.jetty.server.Request, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=20, line=141 (Interpreted frame)
- org.eclipse.jetty.server.handler.HandlerList.handle(java.lang.String, org.eclipse.jetty.server.Request, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=39, line=52 (Interpreted frame)
- org.eclipse.jetty.server.handler.HandlerWrapper.handle(java.lang.String, org.eclipse.jetty.server.Request, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @bci=23, line=97 (Interpreted frame)
- org.eclipse.jetty.server.Server.handle(org.eclipse.jetty.server.HttpChannel) @bci=130, line=497 (Interpreted frame)
- org.eclipse.jetty.server.HttpChannel.handle() @bci=301, line=310 (Interpreted frame)
- org.eclipse.jetty.server.HttpConnection.onFillable() @bci=189, line=257 (Interpreted frame)
- org.eclipse.jetty.io.AbstractConnection$2.run() @bci=4, line=540 (Interpreted frame)
- org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(java.lang.Runnable) @bci=1, line=635 (Interpreted frame)
- org.eclipse.jetty.util.thread.QueuedThreadPool$3.run() @bci=75, line=555 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)



Thread 8490: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Interpreted frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Interpreted frame)
- java.util.concurrent.LinkedBlockingDeque.takeFirst() @bci=22, line=492 (Interpreted frame)
- java.util.concurrent.LinkedBlockingDeque.take() @bci=1, line=680 (Interpreted frame)
- sun.nio.fs.AbstractWatchService.take() @bci=8, line=118 (Interpreted frame)
- org.neo4j.io.fs.watcher.DefaultFileSystemWatcher.startWatching() @bci=16, line=76 (Interpreted frame)
- org.neo4j.io.fs.watcher.RestartableFileSystemWatcher.startWatching() @bci=41, line=94 (Interpreted frame)
- org.neo4j.kernel.impl.util.watcher.DefaultFileSystemWatcherService$FileSystemEventWatcher.run() @bci=7, line=92 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)


Thread 8489: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Interpreted frame)
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=100, line=1088 (Interpreted frame)
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=1, line=809 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)
- org.neo4j.helpers.NamedThreadFactory$2.run() @bci=1, line=109 (Interpreted frame)


Thread 8488: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20, line=215 (Compiled frame)
- org.neo4j.io.pagecache.impl.muninn.MuninnPageCache.parkEvictor(long) @bci=7, line=840 (Compiled frame)
- org.neo4j.io.pagecache.impl.muninn.MuninnPageCache.parkUntilEvictionRequired(int) @bci=12, line=894 (Interpreted frame)
- org.neo4j.io.pagecache.impl.muninn.MuninnPageCache.continuouslySweepPages() @bci=21, line=875 (Interpreted frame)
- org.neo4j.io.pagecache.impl.muninn.EvictionTask.run(org.neo4j.io.pagecache.impl.muninn.MuninnPageCache) @bci=1, line=39 (Interpreted frame)
- org.neo4j.io.pagecache.impl.muninn.BackgroundTask.run() @bci=68, line=45 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=95, line=1142 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)


Thread 8487: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20, line=215 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=78, line=2078 (Compiled frame)
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=124, line=1093 (Interpreted frame)
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=1, line=809 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)
- org.neo4j.helpers.NamedThreadFactory$2.run() @bci=1, line=109 (Interpreted frame)


Thread 8486: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Interpreted frame)
- java.util.TimerThread.mainLoop() @bci=201, line=552 (Interpreted frame)
- java.util.TimerThread.run() @bci=1, line=505 (Interpreted frame)


Thread 8485: (state = IN_NATIVE)
- sun.nio.fs.LinuxWatchService.poll(int, int) @bci=0 (Interpreted frame)
- sun.nio.fs.LinuxWatchService.access$600(int, int) @bci=2, line=47 (Interpreted frame)
- sun.nio.fs.LinuxWatchService$Poller.run() @bci=10, line=314 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame)


Thread 8479: (state = BLOCKED)


Thread 8478: (state = BLOCKED)


Thread 8477: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise)
- java.lang.ref.ReferenceQueue.remove(long) @bci=59, line=143 (Compiled frame)
- java.lang.ref.ReferenceQueue.remove() @bci=2, line=164 (Compiled frame)
- java.lang.ref.Finalizer$FinalizerThread.run() @bci=36, line=209 (Interpreted frame)


Thread 8476: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise)
- java.lang.Object.wait() @bci=2, line=502 (Compiled frame)
- java.lang.ref.Reference.tryHandlePending(boolean) @bci=54, line=191 (Compiled frame)
- java.lang.ref.Reference$ReferenceHandler.run() @bci=1, line=153 (Interpreted frame)

谁能帮我调试/解决这个 neo4j 的高 CPU 使用率问题。

最佳答案

最后,经过一周的调试,我们发现我们没有在节点属性上创建任何索引,这导致了如此高的 CPU 使用率。

创建索引后,我们的 CPU 使用率从 400 下降到 0.3%,我们也将我们的机器从 16 GB、4 核降级到 8Gb、2 核。

请确保在需要的地方为属性和唯一约束创建索引。

关于java - Neo4j java 高 cpu 使用率仍然是 392%,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44364602/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com