Github user davisp commented on the pull request:

    https://github.com/apache/couchdb-couch/pull/161#issuecomment-209554642
  
    @kxepal We actually stole the truncate-to-zero approach from a talk at one 
of the devops conferences some years ago. Its purely based on the observation 
that @rnewson made, when you delete a file, the kernel will consume a large 
amount of disk resources trying to remove that file. Seeing it in the talk made 
us realize why we ended up having such a performance impact when a compaction 
finished. Here's a couple quick links that describe similar solutions:
    
    http://www.awasu.com/weblog/deleting-large-files-from-an-ext3-file-system/
    
http://serverfault.com/questions/480526/deleting-very-large-file-without-webserver-freezing
    
    The ionice suggestion in the second link I'm pretty sure depends on having 
a kernel io scheduler configured and we've seen that have a performance impact 
with anything other than the noop scheduler.
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to