cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ajay <>
Subject Re: Optimal Batch size (Unlogged) for Java driver
Date Mon, 02 Mar 2015 16:41:15 GMT
Hi Ankush,

We are already using Prepared statement and our case is a time series data
as well.

On 02-Mar-2015 10:00 pm, "Ankush Goyal" <> wrote:

> Ajay,
> First of all, I would recommend using PreparedStatements, so you only
> would be sending the variable bound arguments over the wire. Second, I
> think that 5kb limit for WARN is too restrictive, and you could tune that
> on cassandra server side. I think if all you have is 15 columns (as long as
> their values are sanitized and do not go over certain limits), it should be
> fine to send all of them over at the same time. Chunking is necessary, when
> you have time-series type data (for writes) OR you might be reading a lot
> of data via IN query.
> On Monday, March 2, 2015 at 7:55:18 AM UTC-8, Ajay Garga wrote:
>> I have a column family with 15 columns where there are timestamp,
>> timeuuid,  few text fields and rest int  fields.  If I calculate the size
>> of its column name  and it's value and divide 5kb (recommended max size for
>> batch) with the value,  I get result as 12. Is it correct?. Am I missing
>> something?
>> Thanks
>> Ajay
>> On 02-Mar-2015 12:13 pm, "Ankush Goyal" <> wrote:
>>> Hi Ajay,
>>> I would suggest, looking at the approximate size of individual elements
>>> in the batch, and based on that compute max size (chunk size).
>>> Its not really a straightforward calculation, so I would further suggest
>>> making that chunk size a runtime parameter that you can tweak and play
>>> around with until you reach stable state.
>>> On Sunday, March 1, 2015 at 10:06:55 PM UTC-8, Ajay Garga wrote:
>>>> Hi,
>>>> I am looking at a way to compute the optimal batch size in the client
>>>> side similar to the below mentioned bug in the server side (generic as we
>>>> are exposing REST APIs for Cassandra, the column family and the data are
>>>> different each request).
>>>> <>
>>>> How do we compute(approximately using ColumnDefintions or
>>>> ColumnMetadata) the size of a row of a column family from the client side
>>>> using Cassandra Java driver?
>>>> Thanks
>>>> Ajay
>>>  To unsubscribe from this group and stop receiving emails from it, send
>>> an email to
>>  To unsubscribe from this group and stop receiving emails from it, send
> an email to

View raw message