Hi
I have a file upload verticle application (vertx 2.1.5). The standard verticle accepts incoming file via HTTP and uses vertx httpClient streams to S3. Then, it sends an event via eventBus to a worker verticle and the worker verticle writes data into a database. Note: The worker verticle is set to use mutli-thread. =(
The application runs on a 4 CPU (dual-core). In a thread-dump, I can see 8 vert.x-eventloop-thread-n, so I increased the -instance switch to 8 to match the # of eventloop thread.
1) Is is a good idea to match the # of standard verticle with the # of eventloop thread?
2) After starting up the verticle and I am seeing 16 New I/O boss #n threads and 168 New I/O worker threads, is it normal?
However, most of the New I/O worker threads are in runnable state but does not consume much CPU cycle.
Note: no load to the system when I took the thread dump.
in the thead dump, most of the I/O worker threads are with the stacktrace.
sun.nio.ch.EPollArrayWrapper
sun.nio.ch.EPollArrayWrapper
sun.nio.ch.EPollSelectorImpl
sun.nio.ch.SelectorImpl
sun.nio.ch.SelectorImpl
org.jboss.netty.channel.socket.nio.SelectorUtil
org.jboss.netty.channel.socket.nio.AbstractNioSelector
org.jboss.netty.channel.socket.nio.AbstractNioSelector
org.jboss.netty.channel.socket.nio.AbstractNioWorker
org.jboss.netty.channel.socket.nio.NioWorker
org.jboss.netty.util.ThreadRenamingRunnable
org.jboss.netty.util.internal.DeadLockProofWorker$1
java.util.concurrent.ThreadPoolExecutor
java.util.concurrent.ThreadPoolExecutor$Worker
java.lang.Thread
3) The name of the threads are duplicate (twice) in the thread dump?
For example:
New I/O boss #53
New I/O boss #53
New I/O worker #1
New I/O worker #1
Thanks
Tony