{"push_id":1807393143,"size":1,"distinct_size":1,"ref":"refs/heads/develop","head":"d9b7cfb0c3c9a85d0351056c4cb88551ee4ed368","before":"61577c1e732ef51f6b7f0689ede2c79e425b71b6","commits":[{"sha":"d9b7cfb0c3c9a85d0351056c4cb88551ee4ed368","author":{"name":"Hans van Kranenburg","email":"203d66e5372c0c8aa6dec86704b71549fae6db41@knorrie.org"},"message":"WIP: Add example to balance least used block groups\n\nInstead of having to mess around with btrfs balance -dusage=10 and then\n20 etc and looking at the output, just do it.\n\nExample output:\n\n    -# ./balance_least_used.py 40 /\n    Loading block group objects...\n    Balance block group vaddr 603497431040 used_pct 19\n    Completed block group vaddr 603497431040 in 2 sec, total before was 212\n    Balance block group vaddr 488607055872 used_pct 21\n    Completed block group vaddr 488607055872 in 2 sec, total before was 211\n    Balance block group vaddr 576653885440 used_pct 21\n    Completed block group vaddr 576653885440 in 3 sec, total before was 210\n    Block group vaddr 614234849280 used_pct changed 21 -> 38\n    Balance block group vaddr 670069424128 used_pct 21\n    Completed block group vaddr 670069424128 in 2 sec, total before was 209\n    Balance block group vaddr 528335503360 used_pct 23\n    Completed block group vaddr 528335503360 in 3 sec, total before was 208\n    Balance block group vaddr 562695241728 used_pct 24\n    Completed block group vaddr 562695241728 in 3 sec, total before was 207\n    Block group vaddr 659332005888 used_pct changed 24 -> 36\n    Balance block group vaddr 560547758080 used_pct 25\n    Completed block group vaddr 560547758080 in 3 sec, total before was 206\n    [...]\n    Balance block group vaddr 711945355264 used_pct 30\n    Completed block group vaddr 711945355264 in 2 sec, total before was 199\n    Block group vaddr 572358918144 used_pct changed 31 -> 53\n    Block group vaddr 609939881984 used_pct changed 31 -> 47\n    Balance block group vaddr 434919964672 used_pct 32\n    Completed block group vaddr 434919964672 in 3 sec, total before was 199\n    Block group vaddr 513303117824 used_pct changed 33 -> 37\n    Balance block group vaddr 313587138560 used_pct 34\n    Completed block group vaddr 313587138560 in 4 sec, total before was 198\n    Balance block group vaddr 428477513728 used_pct 34\n    Completed block group vaddr 428477513728 in 2 sec, total before was 197\n    Block group vaddr 606718656512 used_pct changed 34 -> 63\n    Block group vaddr 660405747712 used_pct changed 34 -> 44\n    Block group vaddr 674364391424 used_pct changed 35 -> 99\n    Balance block group vaddr 714126393344 used_pct 35\n    Completed block group vaddr 714126393344 in 3 sec, total before was 196\n    Balance block group vaddr 431698739200 used_pct 36\n\nThis clearly shows that balance packs data into existing other block\ngroups, since the total amount of block groups is going down all the\ntime.\n\nAlso, along the way we see that usage of block groups we found when\nstarting has gone up, so if they're still in the usage range, we just\npostpone them again, throwing them back into the work queue. If their\nusage has gone up above the usage limit, ignore them.\n\nAlso:\n\n    -# ./balance_least_used.py 10 /\n    Loading block group objects...\n    Nothing to do, least used block group has used_pct 12","distinct":true,"url":"https://api.github.com/repos/knorrie/python-btrfs/commits/d9b7cfb0c3c9a85d0351056c4cb88551ee4ed368"}]}
{"actor":{"display_login":"knorrie"}}