-
Notifications
You must be signed in to change notification settings - Fork 107
Uhyve mounts in arbitrary paths #1976
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark Results
Benchmark | Current: 6d214f0 | Previous: c6484a7 | Performance Ratio |
---|---|---|---|
startup_benchmark Build Time | 117.82 s |
109.12 s |
1.08 |
startup_benchmark File Size | 0.91 MB |
0.90 MB |
1.01 |
Startup Time - 1 core | 0.91 s (±0.03 s) |
0.88 s (±0.02 s) |
1.03 |
Startup Time - 2 cores | 0.92 s (±0.03 s) |
0.87 s (±0.02 s) |
1.05 |
Startup Time - 4 cores | 0.96 s (±0.03 s) |
0.87 s (±0.03 s) |
1.10 |
multithreaded_benchmark Build Time | 116.64 s |
104.93 s |
1.11 |
multithreaded_benchmark File Size | 1.01 MB |
1.01 MB |
1.01 |
Multithreaded Pi Efficiency - 2 Threads | 87.48 % (±9.20 %) |
3.66 % (±17.59 %) |
23.87 |
Multithreaded Pi Efficiency - 4 Threads | 43.88 % (±3.46 %) |
1.91 % (±9.18 %) |
22.95 |
Multithreaded Pi Efficiency - 8 Threads | 25.25 % (±1.82 %) |
1.02 % (±4.90 %) |
24.73 |
micro_benchmarks Build Time | 118.49 s |
102.53 s |
1.16 |
micro_benchmarks File Size | 1.02 MB |
1.01 MB |
1.01 |
Scheduling time - 1 thread | 70.10 ticks (±4.09 ticks) |
2.54 ticks (±12.22 ticks) |
27.55 |
Scheduling time - 2 threads | 40.46 ticks (±4.82 ticks) |
1.29 ticks (±6.17 ticks) |
31.46 |
Micro - Time for syscall (getpid) | 3.23 ticks (±0.55 ticks) |
0.11 ticks (±0.53 ticks) |
29.30 |
Memcpy speed - (built_in) block size 4096 | 76001.34 MByte/s (±52716.65 MByte/s) |
1662.23 MByte/s (±7978.72 MByte/s) |
45.72 |
Memcpy speed - (built_in) block size 1048576 | 42160.40 MByte/s (±29216.45 MByte/s) |
802.31 MByte/s (±3851.09 MByte/s) |
52.55 |
Memcpy speed - (built_in) block size 16777216 | 27813.77 MByte/s (±22809.42 MByte/s) |
231.25 MByte/s (±1110.01 MByte/s) |
120.27 |
Memset speed - (built_in) block size 4096 | 76197.54 MByte/s (±52842.95 MByte/s) |
1875.00 MByte/s (±9000.00 MByte/s) |
40.64 |
Memset speed - (built_in) block size 1048576 | 42414.33 MByte/s (±29385.86 MByte/s) |
1009.80 MByte/s (±4847.02 MByte/s) |
42.00 |
Memset speed - (built_in) block size 16777216 | 28548.82 MByte/s (±23235.29 MByte/s) |
995.24 MByte/s (±4777.13 MByte/s) |
28.69 |
Memcpy speed - (rust) block size 4096 | 68306.50 MByte/s (±47835.20 MByte/s) |
1463.41 MByte/s (±7024.39 MByte/s) |
46.68 |
Memcpy speed - (rust) block size 1048576 | 42155.88 MByte/s (±29204.14 MByte/s) |
795.04 MByte/s (±3816.19 MByte/s) |
53.02 |
Memcpy speed - (rust) block size 16777216 | 27658.49 MByte/s (±22660.70 MByte/s) |
236.47 MByte/s (±1135.06 MByte/s) |
116.96 |
Memset speed - (rust) block size 4096 | 68786.15 MByte/s (±48216.10 MByte/s) |
1846.15 MByte/s (±8861.54 MByte/s) |
37.26 |
Memset speed - (rust) block size 1048576 | 42379.12 MByte/s (±29356.73 MByte/s) |
1016.88 MByte/s (±4881.03 MByte/s) |
41.68 |
Memset speed - (rust) block size 16777216 | 28373.17 MByte/s (±23073.87 MByte/s) |
993.35 MByte/s (±4768.08 MByte/s) |
28.56 |
alloc_benchmarks Build Time | 108.99 s |
100.75 s |
1.08 |
alloc_benchmarks File Size | 0.98 MB |
0.97 MB |
1.01 |
Allocations - Allocation success | 100.00 % |
2.00 % (±13.86 %) |
50 |
Allocations - Deallocation success | 69.99 % (±0.32 %) |
1.40 % (±9.73 %) |
49.83 |
Allocations - Pre-fail Allocations | 100.00 % |
2.00 % (±13.86 %) |
50 |
Allocations - Average Allocation time | 12153.29 Ticks (±236.69 Ticks) |
229.53 Ticks (±1590.58 Ticks) |
52.95 |
Allocations - Average Allocation time (no fail) | 12153.29 Ticks (±236.69 Ticks) |
229.53 Ticks (±1590.58 Ticks) |
52.95 |
Allocations - Average Deallocation time | 728.27 Ticks (±73.24 Ticks) |
13.15 Ticks (±91.10 Ticks) |
55.39 |
mutex_benchmark Build Time | 110.10 s |
101.46 s |
1.09 |
mutex_benchmark File Size | 1.02 MB |
1.01 MB |
1.01 |
Mutex Stress Test Average Time per Iteration - 1 Threads | 13.36 ns (±0.66 ns) |
0.24 ns (±1.66 ns) |
55.67 |
Mutex Stress Test Average Time per Iteration - 2 Threads | 15.88 ns (±1.27 ns) |
0.26 ns (±1.80 ns) |
61.08 |
This comment was automatically generated by workflow using github-action-benchmark.
3f9220f
to
54c52ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few ideas :)
src/fs/uhyve.rs
Outdated
fdt.find_node("/uhyve,mounts").and_then(|node| { | ||
node.property("mounts") | ||
.and_then(|property| str::from_utf8(property.value).ok()) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fdt.find_node("/uhyve,mounts").and_then(|node| { | |
node.property("mounts") | |
.and_then(|property| str::from_utf8(property.value).ok()) | |
}) | |
fdt.find_node("/uhyve,mounts") | |
.and_then(|node| node.property("mounts")) | |
.and_then(|property| property.as_str()) |
}); | ||
if let Some(mount_str) = mount_str { | ||
assert_ne!(mount_str.len(), 0, "Invalid /uhyve,mounts node in FDT"); | ||
for mount_point in mount_str.trim_end_matches('\0').split('\0') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already done in as_str
in my previous suggestion.
for mount_point in mount_str.trim_end_matches('\0').split('\0') { | |
for mount_point in mount_str.split('\0') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work, as the last element in mount_str
also ends on \0
, thus creating an empy string for mount_point
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's why I mentioned the previous suggestion. as_str
removes the trailing null.
debug!( | ||
"Mounting of {mount_point} failed with {errno:?}. Creating missing parent folders" | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check the error and only attempt recovery on EBADF
similar to create_dir_recursive
?
Co-authored-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
Co-authored-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
Co-authored-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
This allows Uhyve to announce multiple "mounts" via FDT.
Uhyve places the folders to be mounted in the FDT as follows
This does not yet allow single file mounts, but should already help in a lot of scenarios.
Fixes #1572