[ 
https://issues.apache.org/jira/browse/CASSANDRA-13019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16971223#comment-16971223
 ] 

Jeff Jirsa commented on CASSANDRA-13019:
----------------------------------------

All good suggestions. Here's how the nodetool command is setup:

{code}
(oss-ccm) jjirsa:cassandra jjirsa$ ccm node1 nodetool | grep -i snapshot
    clearsnapshot                Remove the snapshot with the given name from 
the given keyspaces. If no snapshotName is specified we will remove all 
snapshots
    getsnapshotthrottle          Print the hardlink-per-second throttle for 
snapshot/clearsnapshot
    listsnapshots                Lists all the snapshots along with the size on 
disk and true size.
    setsnapshotthrottle          Set the hardlinks-per-second cap for snapshot 
and clearsnapshot throttling
    snapshot                     Take a snapshot of specified keyspaces or a 
snapshot of the specified table
(oss-ccm) jjirsa:cassandra jjirsa$ ccm node1 nodetool getsnapshotthrottle

Snapshot throttle is disabled

(oss-ccm) jjirsa:cassandra jjirsa$ time ccm node1 nodetool snapshot

Requested creating snapshot(s) for [all keyspaces] with snapshot name 
[1573418615757] and options {skipFlush=false}
Snapshot directory: 1573418615757


real    0m1.593s
user    0m1.791s
sys     0m0.308s
(oss-ccm) jjirsa:cassandra jjirsa$ ccm node1 nodetool setsnapshotthrottle 2


(oss-ccm) jjirsa:cassandra jjirsa$ ccm node1 nodetool getsnapshotthrottle

Current snapshot throttle: 2 links/s

(oss-ccm) jjirsa:cassandra jjirsa$ time ccm node1 nodetool snapshot

Requested creating snapshot(s) for [all keyspaces] with snapshot name 
[1573418645021] and options {skipFlush=false}
Snapshot directory: 1573418645021


real    1m53.393s
user    0m1.750s
sys     0m0.371s
{code}


> Improve clearsnapshot to delete the snapshot files slowly 
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-13019
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13019
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Legacy/Core
>            Reporter: Dikang Gu
>            Assignee: Jeff Jirsa
>            Priority: Normal
>              Labels: pull-request-available
>             Fix For: 4.x
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> In our environment, we are creating snapshots for backup, after we finish the 
> backup, we are running {{clearsnapshot}} to delete the snapshot files. At 
> that time we may have thousands of files to delete, and it's causing sudden 
> disk usage spike. As a result, we are experiencing a spike of drop messages 
> from Cassandra.
> I think we should implement something like {{slowrm}} to delete the snapshot 
> files slowly, avoid the sudden disk usage spike.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to