> -----Original Message-----
> From: Mark Thomas [mailto:ma...@apache.org]
> Sent: Wednesday, November 06, 2013 1:06 PM
> To: Tomcat Users List
> Subject: Re: Is the Tomcat JSR-356 WebSocketClient-AsyncIO threadpool
> configurable?
> 
> On 06/11/2013 18:01, Bob DeRemer wrote:
> >
> >
> >> -----Original Message----- From: Mark Thomas
> >> [mailto:ma...@apache.org] Sent: Wednesday, November 06, 2013 12:46 PM
> >> To: Tomcat Users List Subject: Re: Is the Tomcat JSR-356
> >> WebSocketClient-AsyncIO threadpool configurable?
> >>
> >> On 06/11/2013 17:07, Bob DeRemer wrote:
> >>> As part of loading testing our JSR-356 websocket implementation
> >>> (running in Tomcat 7.0.48), we've created a subset of Tomcat jars to
> >>> use as our "client" jsr-356 jars.
> >>>
> >>> Q1: are there any plans to create a client jsr-356 jar - similar to
> >>> the Tyrus RI?
> >>
> >> No. It wouldn't be that hard but you could just use the current JARs.
> >> The server classes don't add that much.
> >>
> >>> Secondly, during this load testing, we have experienced occasional
> >>> IO-related issues that we can't quite pin down, but they all seem to
> >>> be client-side.  Usually, this occurs when we have 20K (or more)
> >>> websocket connections in the test client.
> >>> NOTE:  we are only using 50 - 100 threads in an executor against the
> >>> collection of open websockets, so it doesn't seem like a huge number
> >>> of threads sending/receiving messages.
> >>>
> >>> If appears that Tyrus supports configuration of the client side
> >>> threadpool, but we're currently running on Tomcat in the server, so
> >>> we wanted to find out if the "receiving" threads
> >>> (WebSocketClient-AsyncIO) is coming from the same NIO connector
> >>> threadpool, or from somewhere else.
> >>>
> >>> Q2: is the underlying AsynchronousSocketChannel receiving threadpool
> >>> configurable?
> >>>
> >>> -          when running as a standalone java se client app
> >>>
> >>> -          and, when running within Tomcat as a websocket server
> >>
> >> It is a separate thread pool and is non-configurable. It is,
> >> essentially, unlimited. AsynchronousSocketChannel has a default
> >> AsynchronousChannelGroup (which provides the threads) and Tomcat uses
> >> a custom one that mimics the default with the exception that it sets
> >> a useful thread name.
> >>
> >
> > Thanks.  One final clarification: when creating the thread pool, what
> > are the MIN/MAX thread values, as well as the backing Queue size?  I
> > ask because Java's default behavior will use MIN threads to start.
> > If all threads are busy, it will QUEUE up to max queue size.  Only if
> > it exceeds max queued requests does it start adding more threads.
> > Didn't know if it would be possible to overload the MIN threads and
> > start queueing up inbound websocket messages.
> 
>             ExecutorService executorService = new ThreadPoolExecutor(
>                     0,
>                     Integer.MAX_VALUE,
>                     Long.MAX_VALUE, TimeUnit.MILLISECONDS,
>                     new SynchronousQueue<Runnable>(),
>                     new AsyncIOThreadFactory());
> 

Ah, the SyncQueue - so effectively no queueing

thx

> 
> Mark
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to