Closed freemanhjr closed 11 years ago
到其中一个rs机器下面执行 jstack
应该是4个线程;
Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.6-b01 mixed mode):
"Attach Listener" daemon prio=10 tid=0x00007ff6f893a000 nid=0x64ff waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE
Locked ownable synchronizers:
"CommandParallelpool-21-thread-9" daemon prio=10 tid=0x00007ff6dc632000 nid=0x6481 runnable [0x00007ff6ba7d2000] java.lang.Thread.State: RUNNABLE at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
locked <0x00000006132e7ee8> (a com.codefollower.lealone.engine.SessionRemote) at com.codefollower.lealone.hbase.command.CommandParallel$1.call(CommandParallel.java:103) at com.codefollower.lealone.hbase.command.CommandParallel$1.call(CommandParallel.java:101) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
Locked ownable synchronizers:
"CommandParallelpool-21-thread-8" daemon prio=10 tid=0x00007ff6dc269000 nid=0x6480 runnable [0x00007ff6ba3ce000] java.lang.Thread.State: RUNNABLE at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
locked <0x0000000613432c80> (a com.codefollower.lealone.engine.SessionRemote) at com.codefollower.lealone.hbase.command.CommandParallel$1.call(CommandParallel.java:103) at com.codefollower.lealone.hbase.command.CommandParallel$1.call(CommandParallel.java:101) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
Locked ownable synchronizers:
"CommandParallelpool-21-thread-7" daemon prio=10 tid=0x00007ff6dc2d7000 nid=0x647f runnable [0x00007ff6ba4cf000] java.lang.Thread.State: RUNNABLE at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
locked <0x000000061344d560> (a com.codefollower.lealone.engine.SessionRemote) at com.codefollower.lealone.hbase.command.CommandParallel$1.call(CommandParallel.java:103) at com.codefollower.lealone.hbase.command.CommandParallel$1.call(CommandParallel.java:101) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
Locked ownable synchronizers:
"CommandParallelpool-21-thread-6" daemon prio=10 tid=0x00007ff6dc22b800 nid=0x647e runnable [0x00007ff6b9c9c000] java.lang.Thread.State: RUNNABLE at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
locked <0x00000006132e7f50> (a com.codefollower.lealone.engine.SessionRemote) at com.codefollower.lealone.hbase.command.CommandParallel$1.call(CommandParallel.java:103) at com.codefollower.lealone.hbase.command.CommandParallel$1.call(CommandParallel.java:101) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
Locked ownable synchronizers:
"Lealone tcp server (tcp://10.9.0.192:9092) thread-EventThread" daemon prio=10 tid=0x00007ff6dc22d000 nid=0x6462 waiting on condition [0x00007ff6ba6d1000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method)
parking to wait for <0x0000000613438350> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:156) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399) at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:491)
Locked ownable synchronizers:
"Lealone tcp server (SER191:2181)" daemon prio=10 tid=0x00007ff6dc22c000 nid=0x6461 runnable [0x00007ff6b9f9f000] java.lang.Thread.State: RUNNABLE at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method) at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:210) at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:65) at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)
locked <0x00000006132c77c8> (a sun.nio.ch.EPollSelectorImpl) at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:338) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
Locked ownable synchronizers:
"Lealone tcp server (tcp://10.9.0.192:9092) thread-EventThread" daemon prio=10 tid=0x00007ff6dc174000 nid=0x645b waiting on condition [0x00007ff6c3467000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method)
parking to wait for <0x00000006133562d0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:156) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399) at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:491)
Locked ownable synchronizers:
"Lealone tcp server (SER191:2181)" daemon prio=10 tid=0x00007ff6dc26a000 nid=0x645a runnable [0x00007ff6ba1a1000] java.lang.Thread.State: RUNNABLE at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method) at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:210) at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:65) at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)
locked <0x000000061329dbf8> (a sun.nio.ch.EPollSelectorImpl) at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:338) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
Locked ownable synchronizers:
20个region / 5个rs = 每个rs有4个region,所以有4个线程也是对的
5亿行记录,5个rs,20个region,用select count统计,发现每个rs的cpu利用率只有30%左右,最后统计时间要300多秒,同样的环境,用hive也只要100多秒,发现cpu,内存,io都不算高,而hive的MR则cpu可达90%甚至100%,是否并行模型哪里有问题?