Netty Warm Up Stage
Kevin Burton
burtonator at gmail.com
Sun Oct 30 19:29:17 EDT 2011
http://madbean.com/2003/mb2003-44/
... is a good document that explains this problem.
On Thu, Oct 27, 2011 at 11:12 PM, Norman Maurer <
norman.maurer at googlemail.com> wrote:
> 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
> >
>
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20111030/12a34c62/attachment-0001.html
More information about the netty-users
mailing list