You are not logged in.
Pages: 1
Hi everybody!
I just wanted to know if somebody here also has performance issues with btrfs. I used btrfs on my ssd (samsung 840) with the compress=lzo option. When copying large files (~4Gb) a btrfs process (i think it was btrfs_alloc or similar) used 100% of one cpu core and copying was pretty slow compared to ext4. I already switched back to ext4, but still want to know if it is a common issue ...
Edit: it also happens if compression is disabled.
ccc1
Last edited by ccc1 (2013-05-05 10:59:32)
Offline
No experience with btrfs, but that doesn't really seem surprising.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
... you do realise what "compress=lzo" does, yes? Do you really expect it to do that without using your processor intensively? For small files, I imagine the CPU usage is negligible. For large files, I'd expect it to be less so.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
... you do realise what "compress=lzo" does, yes? Do you really expect it to do that without using your processor intensively? For small files, I imagine the CPU usage is negligible. For large files, I'd expect it to be less so.
Good point
.
But these files were videos, so they shouldn't get compressed and if i remember correctly performance was also degraded without using the compress option.
Also interesting: The first GB was transfered fast, but then performance dropped significantly.
ccc1
Offline
But these files were videos, so they shouldn't get compressed
Does btrfs know these things?
Also interesting: The first GB was transfered fast, but then performance dropped significantly.
Cache/buffer? Or simply misleading info from the tool you used?
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
ccc1 wrote:But these files were videos, so they shouldn't get compressed
Does btrfs know these things?
Yes, ihmo it tests if a good compression ratio can be achieved. if not it won't be compressed.
Also interesting: The first GB was transfered fast, but then performance dropped significantly.
Cache/buffer? Or simply misleading info from the tool you used?
might be. unfortunately i can't test right now, cause the i switched back to ext4
Last edited by ccc1 (2013-05-02 00:31:33)
Offline
So how does it test if it can achieve a good compression ratio?
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
So how does it test if it can achieve a good compression ratio?
Since performance is also bad, when compression is disabled it doesn't matter. i guess i should edit my first post ![]()
it would be interesting to know if somebody else sees this cpu-spikes when copying big files.
Offline
I have not seen these performance hits with my btrfs system. I have only bee using it for about a week and a half though, so maybe it will rot with time... I don't know. I fully expect there to be increased cpu with my setup (also compress=lzo), but 100% of one core does sound a bit strange. Overall, my system seems to not work much harder than with my olf setup of ext4 in LVM2.
@cfr, when it copies a file to disk, if it cannot achieve a certain level of benefit from compression (I am not entirely sure what metric is used here), it somehow takes note of that and turns of compression for that one file.
Offline
I copied over 350GB after clean installation of Arch Linux on a production btrfs system. There might be only a few files as big as 4GB but it took equal time to copy, without any excessive processing or performance hit, as it would on ext4. BTW I am using HDD and not SSD.
Last edited by donniezazen (2013-05-02 16:45:15)
Offline
I also have btrfs on an SSD and have a large movie library so I thought I would just to a quick time benchmark copying a 7GB file, mostly out of curiosity over btrfs and ext4 myself.
The CPU never did hit 100%, however gjs-console did get up to 25% a couple times. The SSD is internal btrfs and the HDD is internal ext4
HDD to SDD
time cp /run/media/aaron/beecac74-3604-4161-8802-e356d5e99931/Videos/Movies/Ghost\ Rider\ Spirit\ of\ Vengeance.mkv Desktop/
real 1m2.950s
user 0m0.083s
sys 0m8.390sSDD to SDD
time cp Desktop/Ghost\ Rider\ Spirit\ of\ Vengeance.mkv Videos/
real 1m16.523s
user 0m0.030s
sys 0m9.580sSDD to HDD
time cp Desktop/Ghost\ Rider\ Spirit\ of\ Vengeance.mkv /run/media/aaron/beecac74-3604-4161-8802-e356d5e99931/
real 1m7.588s
user 0m0.010s
sys 0m14.983sHDD to HDD
time cp /run/media/aaron/beecac74-3604-4161-8802-e356d5e99931/Ghost\ Rider\ Spirit\ of\ Vengeance.mkv /run/media/aaron/beecac74-3604-4161-8802-e356d5e99931/Videos/Movies/
real 2m26.918s
user 0m0.070s
sys 0m15.647sSo these are the times I get after sending the file in a full circle. The most notable difference is the HDD took 2.5 minutes copying onto itself but it's an HDD so I expect it. Unfortunately I haven't got a second SSD with ext4 to test with, but I'd say the copy time for the btrfs isn't unreasonable. I don't have any compression on the btrfs and if it makes a difference my HDD is set to cfq while my SDD is using Deadline scheduler.
Offline
Even when copying huge files, compression shouldn't eat a lot of CPU. Also, the compression code spreads the load to all CPUs.
Offline
Thanks for the replies & tests!
So it seems that i'm alone with my problem
. i think i'll give it another try and use btrfs on my ssd again and see how it goes ![]()
ccc1
edit: Formated my ssd with btrfs again and the problem disappeared ![]()
Last edited by ccc1 (2013-05-05 10:59:07)
Offline
Pages: 1