zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henry May <hj...@us.ibm.com>
Subject Re: Latency in asynchronous mode
Date Thu, 23 Oct 2014 22:31:57 GMT
Kishore,

What do you mean by "batching on the server side?'  If there are multiple 
requests waiting to be written to the ZK log, will ZK coalesce them into a 
single disk write?

Henry May
IBM InfoSphere Streams Performance
hjmay@us.ibm.com
720-342-8873
Tie: 963-8873




From:   kishore g <g.kishore@gmail.com>
To:     "user@zookeeper.apache.org" <user@zookeeper.apache.org>
Date:   10/23/2014 04:00 PM
Subject:        Re: Latency in asynchronous mode



That is correct, but keep in mind that the batching on the server side is
independent of what api the client is using (sync/async). Its a matter of
how many concurrent requests are being processed on the server. With async
api it is easy to create that scenario for group commit to kick in with
few(even 1 is sufficient) clients. With Sync you might need 100's or even
1000's of client to create the same effect.

Both api's have pros and cons. It really depends on your use case and what
you are trying to optimize for.

thanks,
Kishore G

On Thu, Oct 23, 2014 at 1:16 PM, Ibrahim El-sanosi (PGR) <
i.s.el-sanosi@newcastle.ac.uk> wrote:

> Ok, this makes sense.  So, we can see that in sync mode the latency will
> measure for just one operation at the time (per fsync), because  the
> transaction log system will  log  (fsync) one request at the time. 
Whereas,
> in Asyc mode, the latency will measure several operationa per fsync,
> meaning that it is not possible to measure the latency per operation
> because the transaction log will (fsync) batch multiple requests in one
> fsync.
>
>
> Can you correct me if the above is not true?
>
> Thank you a lot
>
> Ibrahim
>
>
> -----Original Message-----
> From: Alexander Shraer [mailto:shralex@gmail.com]
> Sent: Thursday, October 23, 2014 04:02 م
> To: user@zookeeper.apache.org
> Subject: RE: Latency in asynchronous mode
>
> I still stay with my previous explanation :) in async mode each client
> invokes many ops concurrently resulting in a longer queue at the leader 
On
> Oct 23, 2014 3:32 PM, "Ibrahim El-sanosi (PGR)" <
> i.s.el-sanosi@newcastle.ac.uk> wrote:
>
> > Thank you Alexander for  replay,
> >
> > In fact, I use more than one clients (one, two, three, four .......,
> > ten), in both modes (synchronous  and asynchronous). So, I found the
> latency in
> > Asynchronous Mode is much higher than latency in synchronous   mode. I 
am
> > really wondering why I am getting such a big different.
> >
> > In synchronous  mode, the latency vary between min/avr/max=5/20/50 and
> > min/avr/max=11/50/120, but it is never reach min/avg/max: 1/371/627 as
> > in asynchronous  mode.
> >
> > Any thought?
> >
> > Thank you
> >
> > -----Original Message-----
> > From: Alexander Shraer [mailto:shralex@gmail.com]
> > Sent: Thursday, October 23, 2014 02:14 م
> > To: user@zookeeper.apache.org
> > Subject: Re: Latency in asynchronous mode
> >
> > Maybe due to queueing at the leader in asynchronous mode - if in your
> > experiment you have one client in sync mode the leader has just one op
> > in the queue at a time On Oct 23, 2014 1:57 PM, "Ibrahim" <
> > i.s.el-sanosi@newcastle.ac.uk> wrote:
> >
> > > Hi folks,
> > >
> > > I am testing ZooKeeper latency in Asynchronous mode. I am sending
> > > update
> > > (write) requests to Zookeeper cluster that consists of 5 physical
> > > Zookeeper.
> > >
> > > So, when I run the stat command I get high latency like:
> > > Latency min/avg/max: 7/339/392
> > > Latency min/avg/max: 1/371/627
> > > Latency min/avg/max: 1/371/627
> > > Latency min/avg/max: 1/364/674
> > > I guess such high latency correspond to fsync (batch requests). But
> > > I wish if someone could help me and explain this behaviour.
> > >
> > > However, testing Zookeeper using Synchronous mode, it gives me
> > > reasonable result like:
> > > Latency min/avg/max: 6/24/55
> > > Latency min/avg/max: 7/22/61
> > > Latency min/avg/max: 7/30/65
> > >
> > > Note that the latency measures in milliseconds.
> > >
> > > I look forward to hearing from you.
> > >
> > > Ibrahim
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > > http://zookeeper-user.578899.n2.nabble.com/Latency-in-asynchronous-m
> > > od e-tp7580446.html Sent from the zookeeper-user mailing list
> > > archive at Nabble.com.
> > >
> >
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message