Opened 11 years ago
Last modified 4 years ago
#10748 assigned bug
Bottleneck in the Network Kit
Reported by: | waddlesplash | Owned by: | leorize |
---|---|---|---|
Priority: | normal | Milestone: | R1.1 |
Component: | Kits/Network Kit | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | #14602 | |
Platform: | All |
Description
This is hrev47102. When using Web+ (libnetapi) to download a file over LAN (guest-to-host in VirtualBox, to be precise) the transfer runs at 2.5MB/s. When using "wget" with the exact same config, it runs at 5MB/s.
I did not determine if the bottleneck is always 1/2 speed or if it simply caps at 2.5MB/s. I did notice the CPU is pegged for both libnetapi and wget.
Change History (11)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Any change if you give Haiku more than 1 cpu core? Which nic was it given in vbox?
comment:3 by , 11 years ago
The libnetapi currently uses a thread for each request, which copies network buffers from the network card to BMessages. This design is suboptimal, unfortunately I'm not sure it's possible to do anything better for Web+, as WebKit is designed around processing everything in the BApplication thread, so network data must come as BMessages.
comment:4 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:5 by , 6 years ago
Blocking: | 14602 added |
---|
comment:6 by , 6 years ago
so network data must come as BMessages.
Some sort of a chunk-based ring buffer would make more sense here, I think, with perhaps only periodic wakeups occuring via BMessages. That should avoid a lot of overhead and thus the high CPU usage.
comment:7 by , 4 years ago
Owner: | changed from | to
---|
comment:8 by , 4 years ago
Milestone: | R1 → R1.1 |
---|
comment:10 by , 4 years ago
The libnetapi part should be fixed. Still, 100% CPU use at 5MB/s seems a bit disappointing? Should we continue investigating that?
Perhaps you can look at it with Scheduling Recorder? Here is a short howto https://plus.google.com/116713839708821747722/posts/QpUzBRczywm