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 tqh, 11 years ago

Perhaps you can look at it with Scheduling Recorder? Here is a short howto https://plus.google.com/116713839708821747722/posts/QpUzBRczywm

comment:2 by Coldfirex, 11 years ago

Any change if you give Haiku more than 1 cpu core? Which nic was it given in vbox?

comment:3 by pulkomandy, 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 axeld, 8 years ago

Owner: changed from axeld to nobody
Status: newassigned

comment:5 by waddlesplash, 6 years ago

Blocking: 14602 added

comment:6 by waddlesplash, 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 pulkomandy, 4 years ago

Owner: changed from nobody to leorize

comment:8 by pulkomandy, 4 years ago

Milestone: R1R1.1

comment:9 by diver, 4 years ago

Is this fixed with hrev54968?

comment:10 by pulkomandy, 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?

comment:11 by diver, 4 years ago

Sure :)

Note: See TracTickets for help on using tickets.