Do I need to run 'btrfs balance' occasionally if I have RAID1 btrfs?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I have two devices setup as RAID1
which I assume data (and metadata) will always mirror on both.
$ sudo btrfs filesystem show
Label: none uuid: eaf30e64-0a90-447f-b53d-1598fe46a8a9
Total devices 2 FS bytes used 751.55GiB
devid 1 size 931.51GiB used 763.03GiB path /dev/sda
devid 2 size 931.51GiB used 763.03GiB path /dev/sdb
$ sudo btrfs filesystem df /
Data, RAID1: total=758.00GiB, used=748.13GiB
System, RAID1: total=32.00MiB, used=144.00KiB
Metadata, RAID1: total=5.00GiB, used=3.42GiB
GlobalReserve, single: total=512.00MiB, used=0.00B
Do I need to run btrfs balance
on this setup?
If yes, how often?
btrfs raid1
add a comment |Â
up vote
1
down vote
favorite
I have two devices setup as RAID1
which I assume data (and metadata) will always mirror on both.
$ sudo btrfs filesystem show
Label: none uuid: eaf30e64-0a90-447f-b53d-1598fe46a8a9
Total devices 2 FS bytes used 751.55GiB
devid 1 size 931.51GiB used 763.03GiB path /dev/sda
devid 2 size 931.51GiB used 763.03GiB path /dev/sdb
$ sudo btrfs filesystem df /
Data, RAID1: total=758.00GiB, used=748.13GiB
System, RAID1: total=32.00MiB, used=144.00KiB
Metadata, RAID1: total=5.00GiB, used=3.42GiB
GlobalReserve, single: total=512.00MiB, used=0.00B
Do I need to run btrfs balance
on this setup?
If yes, how often?
btrfs raid1
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have two devices setup as RAID1
which I assume data (and metadata) will always mirror on both.
$ sudo btrfs filesystem show
Label: none uuid: eaf30e64-0a90-447f-b53d-1598fe46a8a9
Total devices 2 FS bytes used 751.55GiB
devid 1 size 931.51GiB used 763.03GiB path /dev/sda
devid 2 size 931.51GiB used 763.03GiB path /dev/sdb
$ sudo btrfs filesystem df /
Data, RAID1: total=758.00GiB, used=748.13GiB
System, RAID1: total=32.00MiB, used=144.00KiB
Metadata, RAID1: total=5.00GiB, used=3.42GiB
GlobalReserve, single: total=512.00MiB, used=0.00B
Do I need to run btrfs balance
on this setup?
If yes, how often?
btrfs raid1
I have two devices setup as RAID1
which I assume data (and metadata) will always mirror on both.
$ sudo btrfs filesystem show
Label: none uuid: eaf30e64-0a90-447f-b53d-1598fe46a8a9
Total devices 2 FS bytes used 751.55GiB
devid 1 size 931.51GiB used 763.03GiB path /dev/sda
devid 2 size 931.51GiB used 763.03GiB path /dev/sdb
$ sudo btrfs filesystem df /
Data, RAID1: total=758.00GiB, used=748.13GiB
System, RAID1: total=32.00MiB, used=144.00KiB
Metadata, RAID1: total=5.00GiB, used=3.42GiB
GlobalReserve, single: total=512.00MiB, used=0.00B
Do I need to run btrfs balance
on this setup?
If yes, how often?
btrfs raid1
asked Dec 7 '17 at 10:55
wizzup
21917
21917
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
While what Emmanuel Rosa quoted from the Wiki is technically correct (and he's also right by the way, check the wiki, and if you're feeling really adventurous, the list archives for the linux-btrfs@vger.kernel.org mailing list, there's lots of useful info there), there are two things which I would like to point out which are (unfortunately) a bit big to fit in a comment:
- That particular FAQ entry on the wiki is slightly outdated. Current mainline Linux kernels (4.14 as of this answer) have some degree of automated cleanup, though I'm not sure which distros have new enough kernels to provide that.
If you have a high amount of churn on your filesystem (lots of files being created, deleted, and/or copied around on a regular basis), then it can be beneficial to do a small partial balances on a semi-regular basis. For example, I have the following run on most of my systems daily:
btrfs balance start -dusage=50 -dlimit=4 -musage=50 -mlimit=16
This will balance the first four data chunks on the disk that are no more than 50% full, and the first sixteen metadata chunks on the disk that are no more than 50% full. This translates to moving at most just over 4GB of data around, which completes pretty fast, and helps keep the regular churn on my systems from negatively impacting the filesystem all that much.
add a comment |Â
up vote
1
down vote
Quoted verbatim from the BTRFS FAQ:
Do I need to run a balance regularly?
In general usage, no. A full unfiltered balance typically takes a long
time, and will rewrite huge amounts of data unnecessarily. You may
wish to run a balance on metadata only (see Balance_Filters) if you
find you have very large amounts of metadata space allocated but
unused, but this should be a last resort. At some point, this kind of
clean-up will be made an automatic background process. -
https://btrfs.wiki.kernel.org/index.php/FAQ#Do_I_need_to_run_a_balance_regularly.3F
TIP: Anyone using BTRFS, or planning to use BTRFS should read the BTRFS Wiki first. It's absolutely loaded with insight that will save you grief later. Such as, how to properly layout your filesystem in order to best leverage subvolumes, the performance issues with random-writes, how "RAID" works, etc. It's a treasure-trove of information that's definitely worth the few evenings worth of reading.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
While what Emmanuel Rosa quoted from the Wiki is technically correct (and he's also right by the way, check the wiki, and if you're feeling really adventurous, the list archives for the linux-btrfs@vger.kernel.org mailing list, there's lots of useful info there), there are two things which I would like to point out which are (unfortunately) a bit big to fit in a comment:
- That particular FAQ entry on the wiki is slightly outdated. Current mainline Linux kernels (4.14 as of this answer) have some degree of automated cleanup, though I'm not sure which distros have new enough kernels to provide that.
If you have a high amount of churn on your filesystem (lots of files being created, deleted, and/or copied around on a regular basis), then it can be beneficial to do a small partial balances on a semi-regular basis. For example, I have the following run on most of my systems daily:
btrfs balance start -dusage=50 -dlimit=4 -musage=50 -mlimit=16
This will balance the first four data chunks on the disk that are no more than 50% full, and the first sixteen metadata chunks on the disk that are no more than 50% full. This translates to moving at most just over 4GB of data around, which completes pretty fast, and helps keep the regular churn on my systems from negatively impacting the filesystem all that much.
add a comment |Â
up vote
3
down vote
While what Emmanuel Rosa quoted from the Wiki is technically correct (and he's also right by the way, check the wiki, and if you're feeling really adventurous, the list archives for the linux-btrfs@vger.kernel.org mailing list, there's lots of useful info there), there are two things which I would like to point out which are (unfortunately) a bit big to fit in a comment:
- That particular FAQ entry on the wiki is slightly outdated. Current mainline Linux kernels (4.14 as of this answer) have some degree of automated cleanup, though I'm not sure which distros have new enough kernels to provide that.
If you have a high amount of churn on your filesystem (lots of files being created, deleted, and/or copied around on a regular basis), then it can be beneficial to do a small partial balances on a semi-regular basis. For example, I have the following run on most of my systems daily:
btrfs balance start -dusage=50 -dlimit=4 -musage=50 -mlimit=16
This will balance the first four data chunks on the disk that are no more than 50% full, and the first sixteen metadata chunks on the disk that are no more than 50% full. This translates to moving at most just over 4GB of data around, which completes pretty fast, and helps keep the regular churn on my systems from negatively impacting the filesystem all that much.
add a comment |Â
up vote
3
down vote
up vote
3
down vote
While what Emmanuel Rosa quoted from the Wiki is technically correct (and he's also right by the way, check the wiki, and if you're feeling really adventurous, the list archives for the linux-btrfs@vger.kernel.org mailing list, there's lots of useful info there), there are two things which I would like to point out which are (unfortunately) a bit big to fit in a comment:
- That particular FAQ entry on the wiki is slightly outdated. Current mainline Linux kernels (4.14 as of this answer) have some degree of automated cleanup, though I'm not sure which distros have new enough kernels to provide that.
If you have a high amount of churn on your filesystem (lots of files being created, deleted, and/or copied around on a regular basis), then it can be beneficial to do a small partial balances on a semi-regular basis. For example, I have the following run on most of my systems daily:
btrfs balance start -dusage=50 -dlimit=4 -musage=50 -mlimit=16
This will balance the first four data chunks on the disk that are no more than 50% full, and the first sixteen metadata chunks on the disk that are no more than 50% full. This translates to moving at most just over 4GB of data around, which completes pretty fast, and helps keep the regular churn on my systems from negatively impacting the filesystem all that much.
While what Emmanuel Rosa quoted from the Wiki is technically correct (and he's also right by the way, check the wiki, and if you're feeling really adventurous, the list archives for the linux-btrfs@vger.kernel.org mailing list, there's lots of useful info there), there are two things which I would like to point out which are (unfortunately) a bit big to fit in a comment:
- That particular FAQ entry on the wiki is slightly outdated. Current mainline Linux kernels (4.14 as of this answer) have some degree of automated cleanup, though I'm not sure which distros have new enough kernels to provide that.
If you have a high amount of churn on your filesystem (lots of files being created, deleted, and/or copied around on a regular basis), then it can be beneficial to do a small partial balances on a semi-regular basis. For example, I have the following run on most of my systems daily:
btrfs balance start -dusage=50 -dlimit=4 -musage=50 -mlimit=16
This will balance the first four data chunks on the disk that are no more than 50% full, and the first sixteen metadata chunks on the disk that are no more than 50% full. This translates to moving at most just over 4GB of data around, which completes pretty fast, and helps keep the regular churn on my systems from negatively impacting the filesystem all that much.
answered Dec 7 '17 at 20:24
Austin Hemmelgarn
5,1641915
5,1641915
add a comment |Â
add a comment |Â
up vote
1
down vote
Quoted verbatim from the BTRFS FAQ:
Do I need to run a balance regularly?
In general usage, no. A full unfiltered balance typically takes a long
time, and will rewrite huge amounts of data unnecessarily. You may
wish to run a balance on metadata only (see Balance_Filters) if you
find you have very large amounts of metadata space allocated but
unused, but this should be a last resort. At some point, this kind of
clean-up will be made an automatic background process. -
https://btrfs.wiki.kernel.org/index.php/FAQ#Do_I_need_to_run_a_balance_regularly.3F
TIP: Anyone using BTRFS, or planning to use BTRFS should read the BTRFS Wiki first. It's absolutely loaded with insight that will save you grief later. Such as, how to properly layout your filesystem in order to best leverage subvolumes, the performance issues with random-writes, how "RAID" works, etc. It's a treasure-trove of information that's definitely worth the few evenings worth of reading.
add a comment |Â
up vote
1
down vote
Quoted verbatim from the BTRFS FAQ:
Do I need to run a balance regularly?
In general usage, no. A full unfiltered balance typically takes a long
time, and will rewrite huge amounts of data unnecessarily. You may
wish to run a balance on metadata only (see Balance_Filters) if you
find you have very large amounts of metadata space allocated but
unused, but this should be a last resort. At some point, this kind of
clean-up will be made an automatic background process. -
https://btrfs.wiki.kernel.org/index.php/FAQ#Do_I_need_to_run_a_balance_regularly.3F
TIP: Anyone using BTRFS, or planning to use BTRFS should read the BTRFS Wiki first. It's absolutely loaded with insight that will save you grief later. Such as, how to properly layout your filesystem in order to best leverage subvolumes, the performance issues with random-writes, how "RAID" works, etc. It's a treasure-trove of information that's definitely worth the few evenings worth of reading.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Quoted verbatim from the BTRFS FAQ:
Do I need to run a balance regularly?
In general usage, no. A full unfiltered balance typically takes a long
time, and will rewrite huge amounts of data unnecessarily. You may
wish to run a balance on metadata only (see Balance_Filters) if you
find you have very large amounts of metadata space allocated but
unused, but this should be a last resort. At some point, this kind of
clean-up will be made an automatic background process. -
https://btrfs.wiki.kernel.org/index.php/FAQ#Do_I_need_to_run_a_balance_regularly.3F
TIP: Anyone using BTRFS, or planning to use BTRFS should read the BTRFS Wiki first. It's absolutely loaded with insight that will save you grief later. Such as, how to properly layout your filesystem in order to best leverage subvolumes, the performance issues with random-writes, how "RAID" works, etc. It's a treasure-trove of information that's definitely worth the few evenings worth of reading.
Quoted verbatim from the BTRFS FAQ:
Do I need to run a balance regularly?
In general usage, no. A full unfiltered balance typically takes a long
time, and will rewrite huge amounts of data unnecessarily. You may
wish to run a balance on metadata only (see Balance_Filters) if you
find you have very large amounts of metadata space allocated but
unused, but this should be a last resort. At some point, this kind of
clean-up will be made an automatic background process. -
https://btrfs.wiki.kernel.org/index.php/FAQ#Do_I_need_to_run_a_balance_regularly.3F
TIP: Anyone using BTRFS, or planning to use BTRFS should read the BTRFS Wiki first. It's absolutely loaded with insight that will save you grief later. Such as, how to properly layout your filesystem in order to best leverage subvolumes, the performance issues with random-writes, how "RAID" works, etc. It's a treasure-trove of information that's definitely worth the few evenings worth of reading.
answered Dec 7 '17 at 17:39
Emmanuel Rosa
2,2651410
2,2651410
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f409446%2fdo-i-need-to-run-btrfs-balance-occasionally-if-i-have-raid1-btrfs%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password