You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Robert Wille <rw...@fold3.com> on 2015/07/01 23:52:59 UTC

Truncate really slow

I have two test clusters, both 2.0.15. One has a single node and one has three nodes. Truncate on the three node cluster is really slow, but is quite fast on the single-node cluster. My test cases truncate tables before each test, and > 95% of the time in my test cases is spent truncating tables on the 3-node cluster. Auto-snapshotting is off. 

I know there’s some coordination that has to occur when a truncate happens, but it seems really excessive. Almost one second to truncate each table with an otherwise idle cluster.

Any thoughts?

Thanks in advance

Robert


Re: Truncate really slow

Posted by Robert Coli <rc...@eventbrite.com>.
On Wed, Jul 1, 2015 at 2:58 PM, horschi <ho...@gmail.com> wrote:

> you have to enable -Dcassandra.unsafesystem=true in cassandra-env.sh. Also
> disable durables writes for your CFs.
>
> This should speed things up and should reduce IOWait dramatically.
>

The above two suggestions are almost always bad advice anywhere but in a
test environment.

=Rob

Re: Truncate really slow

Posted by horschi <ho...@gmail.com>.
Hi,

you have to enable -Dcassandra.unsafesystem=true in cassandra-env.sh. Also
disable durables writes for your CFs.

This should speed things up and should reduce IOWait dramatically.

kind regards,
Christian

On Wed, Jul 1, 2015 at 11:52 PM, Robert Wille <rw...@fold3.com> wrote:

> I have two test clusters, both 2.0.15. One has a single node and one has
> three nodes. Truncate on the three node cluster is really slow, but is
> quite fast on the single-node cluster. My test cases truncate tables before
> each test, and > 95% of the time in my test cases is spent truncating
> tables on the 3-node cluster. Auto-snapshotting is off.
>
> I know there’s some coordination that has to occur when a truncate
> happens, but it seems really excessive. Almost one second to truncate each
> table with an otherwise idle cluster.
>
> Any thoughts?
>
> Thanks in advance
>
> Robert
>
>