You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@accumulo.apache.org by "John R. Frank" <jr...@diffeo.com> on 2014/08/11 06:16:26 UTC

Re: Optimal # proxy servers

Josh,

Following up on this earlier post about the proxy:

http://www.mail-archive.com/user%40accumulo.apache.org/msg03445.html



On 4/14/14, 1:38 PM, Josh Elser wrote:

> If you care about maximizing your throughput, ingest is probably not 
> desirable through the proxy (you can probably get ~10x faster using the 
> Java BatchWriter API).

> Hrm. 10x may have been overstating too. 5x is probably more accurate. 
> YMMV :)



Is there something more than the extra network hop that makes the proxy 
slow?  The proxy exposes a BatchWriter interface:

https://github.com/accumulo/pyaccumulo/blob/master/README.md#writing-mutations-with-a-batchwriter-batched-and-optimized-for-throughput

So, we can batch up multiple requests through the proxy.  Is there 
something else that is only available (only possible?) by going direct 
instead of through the proxy?

For example, is there a logical difference between what can be done with 
the Java BatchWriter API and this kind of batching loop running through 
the thrift proxy:

https://github.com/diffeo/kvlayer/blob/master/kvlayer/_accumulo.py#L149

(Note the crude handling of the max thrift message size.)

If there is a logical difference, perhaps it would be worthwhile to 
translate the Java BatchWriter into C so there can be native support for 
C/C++/Python applications doing high-speed bulk ingest?


Thanks for your thoughts on this.


Regards,
John

Re: Optimal # proxy servers

Posted by "John R. Frank" <jr...@diffeo.com>.
> There is also https://github.com/phrocker/apeirogon which was a start at 
> a C++ client to Accumulo. I'm not sure the state of it.

Thanks!


> In short, it's possible, but like Eric said, the Java client does quite 
> a bit more than just RPC to other processes.

Yes, understood.

Looks like the client also has the necessary information for figuring out 
which tablets are near the compute worker, which would enable bringing the 
computational task to the data.



> Regarding python+proxy, extra RPC is definitely a concern, but I'm not 
> sure how much of the performance decrease is the use of an 
> interpreted/dynamic language and how much is using the Proxy. I haven't 
> ever benchmarked the two to get a good understanding of where the extra 
> time is really spent.

Yes, its easy to waste a lot of cycles with trivial things like python 
object creation.  After figuring things out, it's often fruitful to 
profile a system on real data and migrate select pieces to native 
implementations in C/C++.  This makes python the easily refactored glue 
between optimized components.

For now, we're experimenting with running more proxies closer to the 
compute workers.  We are interested in a C++ client for Accumulo, which 
could be made to expose python interfaces.


jrf

Re: Optimal # proxy servers

Posted by Josh Elser <jo...@gmail.com>.
There is also https://github.com/phrocker/apeirogon which was a start at 
a C++ client to Accumulo. I'm not sure the state of it. In short, it's 
possible, but like Eric said, the Java client does quite a bit more than 
just RPC to other processes.

Regarding python+proxy, extra RPC is definitely a concern, but I'm not 
sure how much of the performance decrease is the use of an 
interpreted/dynamic language and how much is using the Proxy. I haven't 
ever benchmarked the two to get a good understanding of where the extra 
time is really spent.

On 8/12/14, 2:07 PM, Eric Newton wrote:
>
>     Are there any workable non-proxy solution for Python applications?
>
>
> Not really.  You can use jython which works well.
>
>     Is anyone interested in working on a non-Java client?
>
>
> Sure, but the client library is a non-trivial bit of code.  It
> transparently does the following:
>
> 1) reads zookeeper
> 2) reads the root table(t)
> 3) reads the metadata table
> 4) reads the tablets of interest
> 5) while tablets split, balance and fail
>
>

Re: Optimal # proxy servers

Posted by Eric Newton <er...@gmail.com>.
> Are there any workable non-proxy solution for Python applications?
>

Not really.  You can use jython which works well.


> Is anyone interested in working on a non-Java client?


Sure, but the client library is a non-trivial bit of code.  It
transparently does the following:

1) reads zookeeper
2) reads the root table(t)
3) reads the metadata table
4) reads the tablets of interest
5) while tablets split, balance and fail

Re: Optimal # proxy servers

Posted by "John R. Frank" <jr...@diffeo.com>.
On Mon, 11 Aug 2014, William Slacum wrote:

> Going through the proxy will always be an extra RPC step over using a 
> Java client. Eliminating that step, I think, would net the most benefit.


Are there any workable non-proxy solution for Python applications?

Is anyone interested in working on a non-Java client?


jrf




Re: Optimal # proxy servers

Posted by William Slacum <wi...@accumulo.net>.
Going through the proxy will always be an extra RPC step over using a Java
client. Eliminating that step, I think, would net the most benefit.


On Mon, Aug 11, 2014 at 12:16 AM, John R. Frank <jr...@diffeo.com> wrote:

>
> Josh,
>
> Following up on this earlier post about the proxy:
>
> http://www.mail-archive.com/user%40accumulo.apache.org/msg03445.html
>
>
>
> On 4/14/14, 1:38 PM, Josh Elser wrote:
>
>  If you care about maximizing your throughput, ingest is probably not
>> desirable through the proxy (you can probably get ~10x faster using the
>> Java BatchWriter API).
>>
>
>  Hrm. 10x may have been overstating too. 5x is probably more accurate.
>> YMMV :)
>>
>
>
>
> Is there something more than the extra network hop that makes the proxy
> slow?  The proxy exposes a BatchWriter interface:
>
> https://github.com/accumulo/pyaccumulo/blob/master/README.
> md#writing-mutations-with-a-batchwriter-batched-and-
> optimized-for-throughput
>
> So, we can batch up multiple requests through the proxy.  Is there
> something else that is only available (only possible?) by going direct
> instead of through the proxy?
>
> For example, is there a logical difference between what can be done with
> the Java BatchWriter API and this kind of batching loop running through the
> thrift proxy:
>
> https://github.com/diffeo/kvlayer/blob/master/kvlayer/_accumulo.py#L149
>
> (Note the crude handling of the max thrift message size.)
>
> If there is a logical difference, perhaps it would be worthwhile to
> translate the Java BatchWriter into C so there can be native support for
> C/C++/Python applications doing high-speed bulk ingest?
>
>
> Thanks for your thoughts on this.
>
>
> Regards,
> John
>