Skip to content

fix iperf related functions#2422

Open
cagatay-y wants to merge 10 commits into
hermit-os:mainfrom
cagatay-y:iperf-fix
Open

fix iperf related functions#2422
cagatay-y wants to merge 10 commits into
hermit-os:mainfrom
cagatay-y:iperf-fix

Conversation

@cagatay-y
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark Results

Details
Benchmark Current: f69c921 Previous: ce6a236 Performance Ratio
startup_benchmark Build Time 111.56 s 107.35 s 1.04
startup_benchmark File Size 0.75 MB 0.75 MB 1.00
Startup Time - 1 core 1.02 s (±0.06 s) 0.93 s (±0.07 s) 1.10
Startup Time - 2 cores 1.01 s (±0.03 s) 0.94 s (±0.05 s) 1.08
Startup Time - 4 cores 1.02 s (±0.04 s) 0.99 s (±0.04 s) 1.02
multithreaded_benchmark Build Time 113.92 s 110.67 s 1.03
multithreaded_benchmark File Size 0.87 MB 0.87 MB 1.00
Multithreaded Pi Efficiency - 2 Threads 88.30 % (±15.87 %) 92.42 % (±11.43 %) 0.96
Multithreaded Pi Efficiency - 4 Threads 43.23 % (±7.23 %) 45.92 % (±5.46 %) 0.94
Multithreaded Pi Efficiency - 8 Threads 23.84 % (±3.89 %) 25.34 % (±3.17 %) 0.94
micro_benchmarks Build Time 94.78 s 90.29 s 1.05
micro_benchmarks File Size 0.87 MB 0.87 MB 1.00
Scheduling time - 1 thread 75.32 ticks (±3.96 ticks) 66.89 ticks (±4.01 ticks) 1.13
Scheduling time - 2 threads 42.53 ticks (±4.38 ticks) 37.83 ticks (±4.60 ticks) 1.12
Micro - Time for syscall (getpid) 3.97 ticks (±0.22 ticks) 3.51 ticks (±0.24 ticks) 1.13
Memcpy speed - (built_in) block size 4096 73273.28 MByte/s (±50707.13 MByte/s) 81839.10 MByte/s (±56601.98 MByte/s) 0.90
Memcpy speed - (built_in) block size 1048576 29147.81 MByte/s (±23954.25 MByte/s) 30096.83 MByte/s (±24484.80 MByte/s) 0.97
Memcpy speed - (built_in) block size 16777216 23873.88 MByte/s (±19665.38 MByte/s) 26824.39 MByte/s (±22148.06 MByte/s) 0.89
Memset speed - (built_in) block size 4096 73353.95 MByte/s (±50759.04 MByte/s) 82211.20 MByte/s (±56852.70 MByte/s) 0.89
Memset speed - (built_in) block size 1048576 29947.84 MByte/s (±24420.11 MByte/s) 30820.35 MByte/s (±24892.88 MByte/s) 0.97
Memset speed - (built_in) block size 16777216 24486.04 MByte/s (±20019.36 MByte/s) 27568.62 MByte/s (±22596.81 MByte/s) 0.89
Memcpy speed - (rust) block size 4096 67101.38 MByte/s (±47015.59 MByte/s) 71055.92 MByte/s (±49922.07 MByte/s) 0.94
Memcpy speed - (rust) block size 1048576 29284.98 MByte/s (±24088.67 MByte/s) 30251.51 MByte/s (±24549.45 MByte/s) 0.97
Memcpy speed - (rust) block size 16777216 24214.39 MByte/s (±19898.21 MByte/s) 26489.85 MByte/s (±21826.15 MByte/s) 0.91
Memset speed - (rust) block size 4096 67301.02 MByte/s (±47160.97 MByte/s) 71343.28 MByte/s (±50124.43 MByte/s) 0.94
Memset speed - (rust) block size 1048576 30035.59 MByte/s (±24512.88 MByte/s) 31010.33 MByte/s (±24987.76 MByte/s) 0.97
Memset speed - (rust) block size 16777216 24858.64 MByte/s (±20292.62 MByte/s) 27257.69 MByte/s (±22311.78 MByte/s) 0.91
alloc_benchmarks Build Time 91.06 s 86.24 s 1.06
alloc_benchmarks File Size 0.83 MB 0.83 MB 1.00
Allocations - Allocation success 100.00 % 100.00 % 1
Allocations - Deallocation success 100.00 % 100.00 % 1
Allocations - Pre-fail Allocations 100.00 % 100.00 % 1
Allocations - Average Allocation time 4031.67 Ticks (±60.54 Ticks) 4014.47 Ticks (±73.89 Ticks) 1.00
Allocations - Average Allocation time (no fail) 4031.67 Ticks (±60.54 Ticks) 4014.47 Ticks (±73.89 Ticks) 1.00
Allocations - Average Deallocation time 662.41 Ticks (±35.08 Ticks) 671.96 Ticks (±52.84 Ticks) 0.99
mutex_benchmark Build Time 93.45 s 88.98 s 1.05
mutex_benchmark File Size 0.87 MB 0.87 MB 1.00
Mutex Stress Test Average Time per Iteration - 1 Threads 13.82 ns (±0.68 ns) 13.58 ns (±0.67 ns) 1.02
Mutex Stress Test Average Time per Iteration - 2 Threads 15.66 ns (±9.51 ns) 17.56 ns (±6.54 ns) 0.89

This comment was automatically generated by workflow using github-action-benchmark.

@mkroening mkroening self-assigned this May 8, 2026
Copy link
Copy Markdown
Member

@mkroening mkroening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks! I tested it, and it works. I will take a look at the code later.

Two issues I noticed:

  1. When Hermit is the server, it can only accept one client. After the first client is done, the next client cannot establish a connection. This does not show an error message, but might be related to the next issue.

  2. When Hermit is the client, the test does not end cleanly:

    iperf3: error - unable to send control message - port may not be available, the other side may have stopped running, etc.: Function not implemented
    

These issues do not block this PR at all; I just wanted to document this.

@cagatay-y
Copy link
Copy Markdown
Contributor Author

I am not 100% sure if this is the same problem as the one you have with multiple connections on the server, but when I run the server with the --one-off option so that it shuts off after a test is completed, it gets stuck at https://github.com/esnet/iperf/blob/8a94f44cde986106abe8c8bf06d72d327570e34e/src/iperf_server_api.c#L488. I haven't had a chance to investigate further.

I need to check what the second issue is about.

mkroening and others added 5 commits May 31, 2026 20:08
Copy link
Copy Markdown
Member

@mkroening mkroening left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is great!

I split up the commits a bit and refactored some tiny things. I'll merge this tomorrow. :)

cagatay-y added 5 commits May 31, 2026 21:09
We currently do not support IPv6, so return error to allow the caller to
handle the error.
Excessively large queue sizes can cause us to exhaust memory. Set a
maximum value that is based on the one used by the Linux kernel by
default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants