Netty Warm Up Stage
Norman Maurer
norman.maurer at googlemail.com
Fri Oct 28 02:12:43 EDT 2011
Just some note after looking at your code..
Are you sure you update the numberOfMessages in a thread--safe way ?
If its shared between channels you should use and AtomicInteger.
Bye,
Norman
2011/10/28 Replicator <webakaunt at gmail.com>:
> @John,
>
> Thanks for the insight. Do you a good place to start looking in order to
> straighten up this performance curve? ( Netty / JVM / Network settings,
> etc.. )?
>
> @Norman,
>
> Thanks for the pool buffers => are you aware of any settings I can try
> in order to change the behavior?
>
> @Arvid,
>
> I start the timer whenever the first message arrives. The stats a pretty
> simple really:
>
> override def messageReceived( ctx: ChannelHandlerContext, event:
> MessageEvent ) {
>
>
> // extracts a message here, and does the business dispatch...
>
>
> // then stats..
>
> numberOfMessages = numberOfMessages + 1
>
> if ( numberOfMessages == 1 ) { Timer.start() } else
>
> if ( numberOfMessages % ( MessageLoad.MESSAGE_POOL_SIZE / 10 ) == 0
> ) {
>
> logger.trace( "in memory queue has " + numberOfMessages + "
> packets \t=> " +
> "consuming rate: " + numberOfMessages / Timer.takingSeconds + "
> packets/s" )
>
> if ( numberOfMessages == MessageLoad.MESSAGE_POOL_SIZE ) {
> Timer.stop()
> logger.trace( "\n\n\toverall consuming rate is " +
> numberOfMessages / Timer.tookSeconds + " packets/s" )
> logger.trace( "\ttotal time: " + Timer.tookTimePrettyPrint +
> "\n" )
> }
> }
>
> Before the above "messageReceived", I have a FrameDecoder that is almost
> identical to
> http://docs.jboss.org/netty/3.2/api/org/jboss/netty/handler/codec/frame/FixedLengthFrameDecoder.html
>
> That is pretty much it for the stats collection.
>
> Thank you!
>
> --
> View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Netty-Warm-Up-Stage-tp6937538p6938887.html
> Sent from the Netty User Group mailing list archive at Nabble.com.
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>
More information about the netty-users
mailing list