forked from irungentoo/toxcore
-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Take advantage of fast networks for file transfers
- Make sender send more data per iteration. - Make receiver iterate more often while receiving. Before this commit tox would send at maximum around 4MiB/s. With this patch sustained speeds of up to 100MiB/s were observed on a low-latency, high-bandwidth network. As a consequence of iterating more frequently the receiver's CPU usage is increased for the duration of the transfer. The data structures used to represent friends and file transfers cause the sender code use costly loops that do little real work. This patch makes this problem more visible: the sender uses more CPU while sending. Poor network conditions were simulated using the netem kernel facility: $ tc qdisc add dev lo root netem delay 100ms 50ms \ loss 1% duplicate 1% corrupt 1% reorder 25% 50% and no adverse behavior was encountered. Tests were conducted using toxic using both UDP and TCP.
- Loading branch information
Showing
4 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters