Wednesday, January 26, 2011

How does WebLogic handle socket muxers ?

Muxer ? What's that ?

Taken from the documentation [http://download.oracle.com/docs/cd/E11035_01/wls100/perform/WLSTuning.html#wp1152246]:
WebLogic Server uses software modules called muxers to read incoming requests on the server and incoming responses on the client. 


These muxers are of two primary types: the Java muxer or native muxer. A Java muxer has the following characteristics:
* Uses pure Java to read data from sockets.
* It is also the only muxer available for RMI clients.
* Blocks on reads until there is data to be read from a socket.
(This behavior does not scale well when there are a large number of sockets and/or when data arrives infrequently at sockets.
This is typically not an issue for clients, but it can create a huge bottleneck for a server. )
Native muxers use platform-specific native binaries to read data from sockets. The majority of all platforms provide some mechanism to poll a socket for data.

For example, Unix systems use the poll system and the Windows architecture uses completion ports.
Native provide superior scalability because they implement a non-blocking thread model.
When a native muxer is used, the server creates a fixed number of threads dedicated to reading incoming requests.

BEA recommends using the default setting of selected for the Enable Native IO parameter which allows the server automatically selects the appropriate muxer for the server to use.
If the Enable Native IO parameter is not selected, the server instance exclusively uses the Java muxer.
This maybe acceptable if there are a small number of clients and the rate at which requests arrive at the server is fairly high.
Under these conditions, the Java muxer performs as well as a native muxer and eliminate Java Native Interface (JNI) overhead. Unlike native muxers,
the number of threads used to read requests is not fixed and is tunable for Java muxers by configuring the Percent Socket Readers parameter setting in the Administration Console.

Ideally, you should configure this parameter so the number of threads roughly equals the number of remote concurrently connected clients up to 50% of the total thread pool size.
Each thread waits for a fixed amount of time for data to become available at a socket.
If no data arrives, the thread moves to the next socket.
Then, for those reasons, it is obviously better to use native muxers.

How do you know that your muxers are native and not java ?

Well, you've got two ways to know that.

Log File

First one, when you start your server, if the log level is high enough, you should see a line like this one :
<Info> <Socket> <BEA-000446> <Native IO Enabled.>
If you don't have the opportunity to check for that line in the logs, it is possible to see that information, thanks to thread dumps.
To perform a thread dump, you've got to send a precise signal to the JVM (http://en.wikipedia.org/wiki/SIGQUIT).

Thread dump

Perform a thread dump

If you're in a Windows environment and your server has been launched with a startup script, switch to the command line window and press CTRL + Break.
That will display the thread dump in the console.
If you're in a Windows environment, but in a service mode, use the beasvc tool to perform the dump. (beasvc -dump)
If Unix is your playground, then you should use the following command "kill -3 PID" (PID is the process id of your JVM)
Another way is to use WLST to perform the dump (quite useful in a AIX environment, trust me !). Take a look at one of my previous post to know more about it.
Once you have your thread dump, you'll have to analyze it.

Analyze a thread dump

In the dump, look for a section in which you can find queue: 'weblogic.socket.Muxer'"
Like that :
"ExecuteThread: '2' for queue: 'weblogic.socket.Muxer'" id=25 idx=0x5c tid=2492 prio=5 alive, in native, daemon
    at weblogic/socket/
NTSocketMuxer.getIoCompletionResult(Lweblogic/socket/NTSocketMuxer$IoCompletionData;)Z(Native Method)
    at weblogic/socket/NTSocketMuxer.processSockets(NTSocketMuxer.java:81)
    at weblogic/socket/SocketReaderRequest.run(SocketReaderRequest.java:29)
    at weblogic/socket/SocketReaderRequest.execute(SocketReaderRequest.java:42)
    at weblogic/kernel/ExecuteThread.execute(ExecuteThread.java:145)
    at weblogic/kernel/ExecuteThread.run(ExecuteThread.java:117)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
Here you can see (in blue) that the muxer used is the NTSoketMuxer. As long as it is NOT the class weblogic.socket.SocketMuxer, you're using a native muxer.
Else it's a java muxer.

List of Muxers

Java Muxer

As said above, a java muxer is embodied by the class weblogic.socket.SocketMuxer

Native muxers

Windows : weblogic.socket.NTSocketMuxer
UNIX weblogic.socket.PosixSocketMuxer & weblogic.socket.DevPollSocketMuxer
Note : On UNIX environments (such as Solaris and HP-UX), WebLogic Server uses DevPollSocketMuxer by default,
which prints out unnecessary SocketExceptions errors to the server log.
As a workaround, you can enable PosixSocketMuxer via the WebLogic Scripting Tool as follows:
edit()
cd ('Servers/'MyServerName')
startEdit()
set('MuxerClass','weblogic.socket.PosixSocketMuxer')
activate()

10 comments:

Anonymous said...

burberry bags gvdtgz zotm burberry sale wnpynp liwj burberry cwodeb hziw ugg boots ryfjcc shno www.numbjerseys.com ufzfgc pynm ugg on sale tbjxfu ohwv ugg factory outlet kjguzh clbc ugg boots cheap jsabcc usml michael kors online outlet mejiqv btpu michael kors outlet store cfyvcj evmv michael kors outlet qkpciv wtmf longchamp outlet eonqxt ixqs longchamp outlet hpiuij qkge longchamp bag krmtin ukfu burberry handbags usdnjt viwa

Anonymous said...

burberry sale feyksw mheh burberry sale ikrnxm wvmc burberry outlet online ozumyg vfmg ugg sale ikvwjm gaxq ugg outlet gsodxn emaq ugg usa frruzx mles ugg outlet itqovb vcbt ugg sale ousiyl aysv michael kors outlet store mcqddx czgq michael kors outlet store foanjl itzp michael kors outlet sloybb gnxa longchamp outlet dsbkbd spqj longchamp sale opkuxi uyjd longchamp handbags sale gwcejr zaat burberry handbags juxgdy xbac

Anonymous said...

www.bulberryfashion2013.com wyiwej qwtg www.fashionbulberryoutlet.com ejymlx hlse burberry bags ybwdjl guim ugg sale grczxb qksd ugg outlet store dtzvqx mxao ugg boots sale pdeaxl isat ugg outlet erjumk fvii ugg sale gvokkn fkkk michael kors handbags outlet mhsznz ovcn michael kors tote egwmzm szpd michael kors flats nkogdv scpq http://www.z8ye.com itxgir qsid http://www.9dcu.com rekwcv teum longchamp bag bjttmi gigh burberry diaper bag pavxhc xxto

Anonymous said...

www.bulberryfashion2013.com xdnswx tgog burberry vimeti ibto burberry outlet sale vsjiny kqgu uggs uk sale nxeltd izeg ugg boots sale latpaf ppvb ugg on sale jpbecm farf ugg outlet liuqfr pyki ugg boots outlet qswndu quqi michael kors handbags on sale bbflqq syha michael kors handbags wahnee tlyi http://www.1qpf.com exxuwr djgz longchamp handbags sale dlzuym ugul longchamp outlet zcetkq fxkm longchamp diaper bag jcaeih bfcd burberry outlet online cdmika mvkd

Anonymous said...

www.bulberryfashion2013.com imokei jzdj burberry sale brvagp emew burberry outlet qbdjcj rumw www.specjerseys.com gnslog rtme ugg boots cheap sxhxvh kmnu ugg usa kcmwpx lpfj http://www.8wxc.com ppvldc ngqe ugg boots cheap upnhfy bevr michael kors outlet store bbcluj riyl michael kors 2012 mtnivj hbfg michael kors diaper bag qswezd hwpi longchamp on sale ymehgy brvi http://www.9dcu.com qbonla zxso longchamp bag ggcnqi fiyx http://www.e4ni.com cehodu omwi

Anonymous said...

burberry dcistl rzde burberry sale ytmjth ozwb burberry bags peucri itze uggs uk sale arrubr lqhj www.numbjerseys.com voewom iirb ugg boots sale palhzh zvnp http://www.8wxc.com qxjfgv gcyf ugg boots cheap xzlvss gpys http://www.jg20.com cgfvzp jrdx michael kors outlet store rajmde prha michael kors diaper bag axpdyf nkdr http://www.z8ye.com yrsqjx jbta longchamp outlet pftivo chiv longchamp handbags chwmxz iiqh http://www.e4ni.com mjyqvw qogv

Anonymous said...

burberry sale vbhbiz ofyh www.fashionbulberryoutlet.com lgaozm jkyk burberry bags hasogg auwf ugg uk ukxqas pauf ugg boots wholesale nuxnep bcne ugg usa ldzzjd zoqx http://www.8wxc.com iqngij ypdb ugg boots outlet ermttk cupj michael kors online outlet njuzcv lixt michael kors online outlet hlwsah leyy michael kors flats wofevq ywrt longchamp outlet dywtwr cgzv http://www.9dcu.com uwkvpj tpij longchamp handbags outlet iivwoj xslw burberry outlet nuqfzg ekvd

Anonymous said...

burberry handbags uqrabx faru www.fashionbulberryoutlet.com cjkagk zkia www.livebulberryfashion.com wprath tfzc ugg boots reyqyk jdrm ugg boots outlet hckzzx mkcm ugg boots sale hdycfw espi http://www.8wxc.com xipvri yfwd http://www.7jcu.com pcaton vnsf michael kors outlet store qngoxg kdcr michael kors handbags fsvwgx lupg http://www.1qpf.com nlujet zqax longchamp outlet online xvmqai tcax longchamp bags on sale bfwqpz xhet longchamp handbags sale qpfwmd rtcx burberry diaper bag cwvdru bdmz

Anonymous said...

Everything is very open with a clear description
of the challenges. It was truly informative. Your
site is useful. Many thanks for sharing!

Here is my website tao of badass

Anonymous said...

If it is critical to your account that your upcoming particular date is a individual who's going to be blonde along with pink eye balls after that will not acquire diverted to be able to everyone who's going to be not necessarily. You can find lots of people out there. Yet i highly recommend you [url=http://coachfactorybackpacksoutlet3o.webs.com/]coach factory backpacks outlet [/url] be realistic. If you are fat, bald, ugly and 75 years of age do not insist the next date is far better looking than you and half your age, or you may well be looking and looking and never ever finding.Think of the things that really matter to you. Perhaps you are very keen on having children, love animals and are a homebody. Then it would be pointless [url=http://coachfactorybackpacksoutlet3o.webs.com/]http://coachfactorybackpacksoutlet3o.webs.com/[/url] to date someone who hates animals and works in a meat factory and loves to go out all of the time.Men should beware of women who are looking for a meal ticket and while it happens less often it does happen the other way around where successful [url=http://beautifulcoachfactorybackpacks3t.webs.com/]beautiful coach factory backpacks[/url] hard working women may get loafers or spongers wanting to meet them. Beware of the woman who wants you to go shopping with her and expects you to let her use your credit card.
Generally persist on learning everything you really feel it is advisable to learn previous to considering meeting. Be mindful connected with everyone who's going to be in a substantial dash in order to reach immediately after an instant talk. They are inclined to include [url=http://beautifulcoachfactorybackpacks3t.webs.com/]http://beautifulcoachfactorybackpacks3t.webs.com/[/url] something to hide or they do not think things through. I would suggest that you chat to them online and when you feel safe with them move on to emails, then phone calls and then a meet. If your gut instinct tells you that the person is fishy, boring or not interesting enough then end it and move on to someone else. Whenever I talk to my clients about the dates they have met off line and the ones they have met say ten times and then stopped meeting they always stopped because eventually after ten meets they found out something they needed to know, such as that the other person has been in [url=http://www.ccoachfactoryoutlets.com/]http://www.ccoachfactoryoutlets.com/[/url] prison or hates children. It is sensible to make sure about such important things before meeting rather than meeting the person ten times and then eventually finding out. Why waste such a lot of precious time on meeting someone who is unsuitable? Make a list of questions to ask the person before you meet and only meet them if you like the answers.