Skip to content

Commit

Permalink
Lower gc_urgent_sleeptime to 50
Browse files Browse the repository at this point in the history
This will substantially speed up GC progress

Test: Run /vendor/bin/checkpoint_gc
Bug: 133822599
Change-Id: Ic1f064437381bce99d62dfd146088d43e08b1766
  • Loading branch information
drosen-google committed Jun 6, 2019
1 parent 5c1ad00 commit 999afee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions checkpoint_gc/checkpoint_gc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ if [ -z "${NAME}" ]; then
exit 0
fi
log -pi -t checkpoint_gc Turning on GC for ${NAME}
read OLD_SLEEP < /sys/fs/f2fs/${NAME}/gc_urgent_sleep_time || exit 1
echo 50 > /sys/fs/f2fs/${NAME}/gc_urgent_sleep_time || exit 1
echo 1 > /sys/fs/f2fs/${NAME}/gc_urgent || exit 1

read DIRTY_SEGMENTS_START < /sys/fs/f2fs/${NAME}/dirty_segments
Expand All @@ -63,6 +65,7 @@ done

log -pi -t checkpoint_gc Turning off GC for ${NAME}
echo 0 > /sys/fs/f2fs/${NAME}/gc_urgent
echo ${OLD_SLEEP} > /sys/fs/f2fs/${NAME}/gc_urgent_sleep_time
sync

print -u${STATUS_FD} "global_progress 1.0"
Expand Down

0 comments on commit 999afee

Please sign in to comment.