-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cp performance issue #7092
Comments
please rerun the benchmarks with hyperfine. time isn't good enough for this. |
and how did you get/build your ~/.cargo/bin/coreutils ? |
I did a quick experiment and while we are slower, it isn't to your scale:
With
to create random files |
The profile: |
I installed with > cargo --version
cargo 1.84.0-nightly (8c30ce536 2024-10-15)
> inxi -CMm
Machine:
Type: Kvm System: OpenStack Foundation product: OpenStack Nova v: 13.2.1-20230116174715_590b25c
serial: a2e7a571-64eb-471c-bbc6-d38d185b6d3e
Mobo: N/A model: N/A serial: N/A BIOS: SeaBIOS
v: rel-1.10.2-0-g5f4c7b1-20181220_000000-szxrtosci10000 date: 04/01/2014
Memory:
System RAM: total: 64 GiB available: 62.79 GiB used: 4.84 GiB (7.7%)
Array-1: capacity: 64 GiB slots: 4 modules: 4 EC: Multi-bit ECC
Device-1: DIMM 0 type: RAM size: 16 GiB speed: N/A
Device-2: DIMM 1 type: RAM size: 16 GiB speed: N/A
Device-3: DIMM 2 type: RAM size: 16 GiB speed: N/A
Device-4: DIMM 3 type: RAM size: 16 GiB speed: N/A
CPU:
Info: 8-core model: Intel Xeon Gold 6266C bits: 64 type: MT MCP cache: L2: 8 MiB
Speed (MHz): avg: 3000 min/max: N/A cores: 1: 3000 2: 3000 3: 3000 4: 3000 5: 3000 6: 3000
7: 3000 8: 3000 9: 3000 10: 3000 11: 3000 12: 3000 13: 3000 14: 3000 15: 3000 16: 3000 |
I also can't reproduce this. What kind of storage does you machine have? The only thing I can think of is that maybe you have slow storage but a filesystem that supports reflinking and uu_cp isn't picking up on that. Maybe you could try running it with |
@tertsdiepraam both GNU coreutils cp and uu_cp report |
@sylvestre This is my hyperfine results.
|
BTW, I'm using an AWS-like elastic compute cloud. Not sure whether this affects I/O much.
|
Could you please run samply and share the profile of your run? Thanks |
I'm sorry it seems that I cannot use FYI, I tried a physical machine (running on Windows however), it also taks <3s for |
Sure, please share the profile.json :) |
@sylvestre profile.json is embedded in last reply:) |
sorry! here is the profile: https://share.firefox.dev/4fTBcUr as it isn't really actionable |
profile.json > rustc --version
rustc 1.86.0-nightly (243d2ca4d 2025-01-06)
> time samply record -s -n /root/OSS/rust/coreutils/target/debug/coreutils cp -r cymbol_out/ cymbol_out_bak
real 49.19s
user 0.10s
sys 3.24s |
you will have to upload it yourself. the profile doesn't have the debug info, sorry |
I'm sorry but I'm not allowed to upload files greater than certain size(for sure coreutils exceeds it) according to my company's regulations :( |
Maybe you could run it on just one file? Even if it doesn't take that long we might still be able to see which function takes up most of the time. |
I failed to upload the debugging version of |
maybe try on some personal hardware :) |
@sylvestre I cannot reproduce the huge performance differences on my personal (physical) machines; and that's why I guess it may result from I/O virtualization. |
As is observed in nushell/nushell#14778,
uu_cp
seems to have performance issues when dealing with large directories.In my case, the directory is of ~2.5GB containing a list of big json files. GNU coreutils cp takes <3s to complete the operation but
uu_cp
takes ~50s. I've also tried on zsh with similar results.The text was updated successfully, but these errors were encountered: