HQebupt opened a new pull request, #3976:
URL: https://github.com/apache/bookkeeper/pull/3976

   ### Motivation
   The purpose of this feature is to provide more flexibility and control over 
the compaction process in the Bookkeeper server by allowing users to configure 
the read rate of compaction according to their specific requirements.
   It adds support for configuring the read rate of compaction in bytes per 
second.
   
   In our production environment of Bookkeeper, we have set 
compactionRateByBytes=30M. However, we have observed that it only limits the 
write speed to disk and does not limit the read speed from disk. In our 
environment, the continuous saturation of disk IO for reads in compaction is 
causing issues with data consumption from the disk.
   
   ```
   // Set the rate at which compaction will readd entries. The unit is bytes 
added per second.
    compactionRateByBytes=31457280
   ```
   
   
![image](https://github.com/HQebupt/bookkeeper/assets/4970972/033dc6d3-19d7-4fb7-9c6b-5f13c49686ad)
   
   
![image](https://github.com/HQebupt/bookkeeper/assets/4970972/f0b27251-7209-4e4d-8357-dcd0b7804778)
   
   
   ### Changes
   
   - In the `GarbageCollectorThread` class, a new field 
`compactionReadByteRateLimiter` of type RateLimiter is added to control the 
read rate of compaction.
   - In the `ServerConfiguration` class, a new configuration property 
`COMPACTION_READ_RATE_BY_BYTES` is defined to specify the read rate of 
compaction in bytes per second. 
   
   Master Issue: #[8](https://github.com/HQebupt/bookkeeper/pull/8)
   


-- 
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