thetumbled commented on code in PR #4381:
URL: https://github.com/apache/bookkeeper/pull/4381#discussion_r1614987633


##########
site3/website/src/pages/bps/BP-67-support-skipping-compaction-at-busy-times.md:
##########
@@ -0,0 +1,30 @@
+# BP-67: Support skipping compaction at busy times
+
+### Motivation
+
+Compaction mechanism is a critical part of the system. It is responsible for 
compacting the entry log file to reclaim disk space.
+But it is an IO intensive operation. While compaction is running, it need to 
copy the valid data to a new file and delete the old file.
+While the system is under heavy load, it is not a good idea to run compaction 
as it will consume more IO and CPU resources.
+So, it is better to skip compaction at busy times. For many use cases, the 
busy time is predictable, we can skip compaction at those times.
+
+### Configuration
+
+add the following configuration:
+
+```
+skipCompactionHourRange
+```
+
+default value is empty, which means do not skip compaction.
+Value format is `startHour-endHour`, for example, `0-6,18-24` means skip 
compaction from 0 to 6 and 18 to 24.

Review Comment:
   We will check the hour range at the beginning of the compaction execution 
and each time it compact a entry log completly.
   We use `LocalTime.now().getHour()` to get the hour, implementation refer to: 
https://github.com/apache/bookkeeper/pull/4385



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to