Giter VIP home page Giter VIP logo

stopgap's Introduction

StopGap

Windows/NTFS free space defragmentation.

What?

StopGap will fill up smallish free space areas (gaps) on NTFS drives.

It is not meant to defragment files (although it does to some extend) nor is it mean to optimize the whole layout. Use other tools for these tasks.

Why?

Common (free) defragmentation tools either do not support consolidating free space (UltraDefrag e.g.), or are dead slow on large file systems (Windows Defrag, MyDefrag, Defraggler).

I need to defrag space on some large partitions (500GB, 1,2 TB), where due to the workload and usage pattern, the partitions contain millions of differently sized files, with many deletes/truncates on many files, often creating 100K+ tiny gaps in the layout aka. free space fragmentation. This in turn will cause new/changed files to become heavily fragmented (in the order of thousands of fragments), which of course slows accesses down to a crawl. Since the files change a lot, regular, "optimizing" defragmentation is overkill, will take too long, and also performs far more writes then necessary.

Hence StopGap.

State?

The code is currently alpha-quality. Expect bugs. Although, by using the Windows Defrag API, there shouldn't be any data loss issues (expect if your drive fails, of course).

Notes

  • StopGap makes use of zenwinx, which is part of the great UltraDefrag project.
  • StopGap might use multiple passes.
  • StopGap is currently single-threaded. While it would be possible to make parts of it multi-threaded, it isn't worth the fuzz: If StopGap operates as intented, most time will be I/O wait anyway, and doing multiple/overlapped IOOps in parallel isn't really helpful either.
  • StopGap might initially cause more gaps to appear. This is expected and the gaps should disappear again as the operation progresses.
  • You need the WDK to compile. And boost.
  • Should compile using the MSVC and Intel compilers. Tested MSVC 2012 and Intel 14. As such, StopGap only uses C++11 features supported by said compilers.
  • If you experience bugs, do not expect me to fix them! I probably won't. This whole project is not a fulfledged end-comsumer product anyway. Having said that, sane patches are certainly welcome.
  • Why I use zenwinx you ask? Because I'm too lazy to reinvent the wheel.
  • Why I do not use udefrag.exe/udefrag.dll? Because I'm too lazy to hack this stuff in udefrag.

stopgap's People

Contributors

nmaier avatar

Watchers

Brain Beamer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.