Commit graph

50 commits

Author SHA1 Message Date
Joakim Frostegård
c4fd3c9e83 udp: add cleaning worker 2024-02-10 15:48:09 +01:00
Joakim Frostegård
7fa143964e udp: remove swarm worker and related logic 2024-02-10 11:40:11 +01:00
Joakim Frostegård
a2e1dd4eef udp: use shared swarm state in io uring implementation 2024-02-10 11:35:52 +01:00
Joakim Frostegård
2da966098f WIP: use shared swarm state in mio worker 2024-02-10 11:21:48 +01:00
Joakim Frostegård
53497308f1 udp: create file with thread-shared torrent map implementation 2024-02-10 10:01:45 +01:00
Joakim Frostegård
c980c23ffc bencher: also bench aquatic_udp with io_uring 2024-02-09 01:21:24 +01:00
Joakim Frostegård
37e4514427 udp: change default max_response_peers to 30 2024-02-08 10:08:31 +01:00
Joakim Frostegård
7ceb01f1ae udp: change default ring_size to 128 2024-02-08 10:07:44 +01:00
Joakim Frostegård
e705c03981 Explicity use IndexMap::swap_remove to silence warnings 2024-02-06 18:34:17 +01:00
Joakim Frostegård
40e33d8af1 fix prometheus timeout mask metrics 2024-02-04 00:03:01 +01:00
Joakim Frostegård
437f2def7d aquatic_common: feature-gate cpu pinning, remove hwloc feature 2024-02-03 23:16:45 +01:00
Joakim Frostegård
d7e06468c3 http: quit if any worker thread quits 2024-02-03 22:38:05 +01:00
Joakim Frostegård
4ca73630c4 Move prometheus endpoint spawner from udp to common crate 2024-02-03 22:07:56 +01:00
Joakim Frostegård
3513b714b4 udp: consistently use NonZeroU16 for announce request port 2024-02-03 11:46:38 +01:00
Joakim Frostegård
b4e27903dc udp: actually register global metrics handler 2024-02-02 14:46:42 +01:00
Joakim Frostegård
bbb4c5e411 udp: remove ConnectedRequestSender::any_full method 2024-02-02 14:09:46 +01:00
Joakim Frostegård
c48a83b06a udp: reorder declarations in common.rs 2024-02-02 13:55:57 +01:00
Joakim Frostegård
be5165bcf2 udp: mio socket worker: make send_response plain fn 2024-02-02 13:48:06 +01:00
Joakim Frostegård
405bbaca93 udp: improve statistics structs
- Now, workers don't need to keep track of which atomic usize
  to update
- Additionally, prometheus now gets separate information per
  socket worker
2024-02-02 13:39:46 +01:00
Joakim Frostegård
e2e525b560 udp: move PeerStatus from common.rs to swarm worker 2024-02-01 23:25:43 +01:00
Joakim Frostegård
216bb93088 udp: improve WorkerType Display implementation 2024-01-29 22:27:03 +01:00
Joakim Frostegård
1967d8aa3e udp: return errors from threads instead of panicking in some cases 2024-01-29 22:17:30 +01:00
Joakim Frostegård
ae75d0cbe4 udp socket worker: fix warning 2024-01-29 22:12:08 +01:00
Joakim Frostegård
6dec985d45 udp: store prometheus exporter thread handle, periodically render 2024-01-29 22:09:20 +01:00
Joakim Frostegård
8f838098aa udp: replace PanicSentinel with loop over JoinHandles 2024-01-29 21:45:50 +01:00
Joakim Frostegård
1c59972834 udp protocol: rename "write" and "from_bytes" methods 2024-01-29 19:38:12 +01:00
Joakim Frostegård
c5e09e8106 README files: mention installing build-essential 2024-01-27 18:12:21 +01:00
Joakim Frostegård
7d4ba6940b Improve README files 2024-01-27 17:46:49 +01:00
Joakim Frostegård
9d1bba5e92 udp: fix/silence clippy warnings 2024-01-20 10:08:53 +01:00
Joakim Frostegård
5401eaf85f Run cargo clippy --fix and cargo fmt 2024-01-20 09:56:14 +01:00
Joakim Frostegård
0c03048ce8 udp: update metrics crate 2024-01-20 09:42:17 +01:00
Joakim Frostegård
1a6b4345d4 udp: remove thingbuf in favor of crossbeam channel
thingbuf didn't have obvious performance advantages and is a lot less
mature. Furthermore, it doesn't support anything like crossbeam
Receiver::try_iter, which is prefereable now that announce responses
can be sent to any socket worker.
2024-01-20 09:41:07 +01:00
Joakim Frostegård
e77c9f46e7 udp: store torrents with few peers without an extra heap alloc 2024-01-20 09:40:09 +01:00
Joakim Frostegård
0eaa4475e2 udp: index peers by packet src ip and provided port instead of peer_id 2024-01-04 17:04:17 +01:00
Joakim Frostegård
e76394b60d udp: decrease default worker_channel_size to 1024 2024-01-02 17:25:54 +01:00
Joakim Frostegård
6870a9e9c4 udp: lower log level from info to debug for several mio statements 2024-01-02 17:00:22 +01:00
Joakim Frostegård
4249a7f48d udp: improve defaults for worker channel size and socket recv buffer 2024-01-02 16:59:08 +01:00
Joakim Frostegård
c4e644cb23 udp: log (info-level) estimated channel memory use 2024-01-02 16:57:46 +01:00
Joakim Frostegård
b527af7195 udp: distribute announce swarm responses among socket workers
They don't have to be sent from the same worker that received the
request, so we can decrease performance loss from underutilized
threads this way.
2024-01-01 14:13:30 +01:00
Joakim Frostegård
0f469ff725 udp: increase default config value worker_channel_size 2023-12-30 18:16:53 +01:00
Joakim Frostegård
ba8bdd6ae6 udp: harden ConnectionValidator 2023-12-26 00:19:47 +01:00
Joakim Frostegård
afc3deb656 Add aquatic_load_tester: multi-run multi-implementation load tests
- Work in progress
- Only UDP is currently implemented so far
- Also includes some changes to other crates, notably deriving
  serde Serialize for Config structs and making udp_load_test
  a lib and a binary
2023-12-17 21:59:18 +01:00
Joakim Frostegård
cb39eb69c8 udp: reorder code in swarm storage 2023-12-10 12:13:56 +01:00
Joakim Frostegård
0c4140165b udp: reuse response channel mem, add backpressure, faster peer extract 2023-12-10 12:07:38 +01:00
Joakim Frostegård
0e12dd1b13 use zerocopy in udp protocol, easy running transfer CI locally 2023-12-02 12:24:41 +01:00
Joakim Frostegård
af16a9e682 udp: fix io_uring soundness issues 2023-11-23 18:52:13 +01:00
Joakim Frostegård
fe5ccf6646
ws: refactor, bug fixes, improvements (#155)
- split swarm worker into two modules
- split socket worker into two modules
- keep track of which offers peers have sent and only allow matching
answers
- always clean up after closing connection
- use channel for telling connections to close
- move some logic into new ConnectionRunner struct
- use slotmap for connection reference storage
- fix double counting of error responses
- actually close connections that take too long to send responses to
- remove announced_info_hashes entry on AnnounceEvent::Stopped
2023-11-09 18:06:21 +01:00
Joakim Frostegård
6a23ef9103 ws: reload tls config on SIGUSR1 2023-10-24 18:36:56 +02:00
Joakim Frostegård
c5c995bb80
Split README into separate files (#150)
* Create a separate udp README file

* Split README into separate files for all three implementations

* Minor README fixes
2023-10-19 19:59:11 +02:00
Joakim Frostegård
9b032f7e24 Move all crates to new crates dir 2023-10-18 23:53:41 +02:00