Skip to content

Instantly share code, notes, and snippets.

@ronen-fr
Created April 3, 2024 13:54
Show Gist options
  • Save ronen-fr/2f9a14fe6156ee75422e576ca054277d to your computer and use it in GitHub Desktop.
Save ronen-fr/2f9a14fe6156ee75422e576ca054277d to your computer and use it in GitHub Desktop.
example of initiating a slow deep-scrub
#
MDS=1 MGR=1 OSD=4 MON=1 ../src/vstart.sh -n --without-dashboard -n --msgr2 -X --memstore -o "memstore_device_bytes=68435456" -o "osd_op_queue=wpq"
sleep 5
bin/ceph -s
bin/ceph config set global osd_pool_default_pg_autoscale_mode off
sleep 2
bin/ceph osd pool create pl1 8 8
pl1_num=`bin/ceph osd pool stats pl1 | sed -n -r -e 's/.*id[^0-9]*([0-9]+)$/\1/p'`
echo "Created PL1 with ID " $pl1_num
#bin/ceph osd pool autoscale-status
sleep 1
bin/ceph osd pool set pl1 size 3
#bin/ceph osd pool set pl1 size 4
bin/ceph osd pool set pl1 min_size 3
bin/ceph osd pool set pl1 pg_autoscale_mode off
bin/ceph osd pool stats
#bin/ceph osd pool set '.mgr' pg_autoscale_mode off
sleep 2
bin/rados bench -p pl1 -t 1 1 write -b 4096 --max-objects 8 --no-cleanup
bin/rados bench -p pl1 1 write -b 4096 --max-objects 128 --show-time --no-cleanup --run-name eeeee
bin/ceph tell osd.* config set debug_osd 20/20
bin/rados bench -p pl1 -t 1 1 write -b 4096 --max-objects 8 --no-cleanup
bin/rados bench -p pl1 1 write -b 4096 --max-objects 128 --show-time --no-cleanup --run-name eeeee
bin/ceph tell osd.* config set osd_scrub_sleep "3.0"
bin/ceph tell osd.* config set osd_blocked_scrub_grace_period 20
bin/ceph tell osd.* config set osd_stats_update_period_scrubbing 2
bin/ceph tell osd.* config set osd_stats_update_period_not_scrubbing 3
bin/ceph tell osd.* config set osd_scrub_backoff_ratio 0
bin/ceph tell osd.* config set osd_scrub_interval_randomize_ratio 0
bin/ceph tell osd.* config set osd_deep_scrub_randomize_ratio 0
bin/ceph tell osd.* config set osd_scrub_chunk_max 5
bin/ceph tell osd.* config set osd_max_scrubs 2
bin/ceph tell $pl1_num.7 deep-scrub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment