Hi all, We have working on decoupling engine thread model from transport thread model.Previously carbon transport was included with the Disruptor and according to the behaviour of MSF4J it is very hard to mapped custom logics written using MSF4J to Disruptor thread model in order to gain better performance. So we have moved Disruptor thread model to carbon-gateway and carbon-transport is kept with Netty thread pool.
According to current implementation carbon-transport will dispatch events to registered message processor via Netty worker threads and there after it operates under engine level thread model. Following is the Thread model diagram for Integration Server. [image: gw_thread_model.png] Basically it works as follows - CPU bound mediators are working on CPU bound disruptor threads. - IO bound mediators are working on IO bound disruptor threads. - We assume custom mediators are written in bad way and may contain blocking calls so those are executed using IO bound mediator. - We have included ThreadPool implementation as well and can switch between ThreadPool based model or Disruptor based model. This is for we haven’t yet finalized exact thread model and we keep testing with different mediators how both are behaving according to different parameters like TPS, memory, startup time ,latency , .etc Following are some of the tests results we have conducted with both thread model implementations for two main scenarios. Machine Details Server :- 32 core machine with 64 GB memory Back End Service :- Netty based Echo Service which has TPS around 100000 Tested message size :- 4kb Server startup Time with Disruptor :- 1.34 s Server startup time without Disruptor :- 1.38 s Use case:- (CPU + IO) Header based routing with File Writing .One message path is writing message to file and other one sends messages to Echo service and respond back to client. TPS [image: image1.png] Latency [image: image2.png] Memory Disruptor [image: disruptor.png] Thread Pool [image: threadpoolMemory.png] Use case:- (CPU ) Header based routing , send messages to Echo service and respond back to client. TPS [image: image3.png] Latency [image: image4.png] For test results please look in to [1] [1] https://docs.google.com/spreadsheets/d/1A2dxknP1xEJKBpl4ymbQD2Mt9kWywYCI-60j16JVLx0/edit#gid=0 Thanks IsuruR -- Best Regards Isuru Ranawaka M: +94714629880 Blog : http://isurur.blogspot.com/
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
