Comments (8)
Thanks for the report! Can you detail how you generated the numbers in the table? The command you provided just shows throughput for one connection (I think) for me, so I wasn't sure how you were sending successive connections.
from tokio.
In my entire report, I meant request = line (one request for Echo as Service
). So yeah, a single connection.
The numbers were generated with the command shown. You have to divide the bytes/s by two to get requests/s since each request (line) is 2 bytes. You can also wait for the command to finish and divide the time reported by the second dd
instance by the count=
number.
from tokio.
Isn't this just showing that if each requests sends more data it takes longer to process that request?
from tokio.
No, all requests are the same size (note the LineCodec
).
from tokio.
I believe this is due to this loop https://github.com/tokio-rs/tokio-proto/blob/8fb8e482dcd55cf02ceee165f8e08eee799c96d3/src/streaming/pipeline/server.rs#L136-L138
This is hitting a pessimistic case where there's millions of concurrent requests on one connection and because they're pipeliend they must be completed in order, and right now they're all polled every time.
If this is a problem for you I'd recommend avoiding tokio-proto and using something like stream.buffered(N)
as it has a more scalable implementation.
from tokio.
The docs suggest there might be a way to limit the number of in-flight requests, but I can't figure out how.
from tokio.
I think that might never have been implemented :)
from tokio.
Hopefully this is resolved now. Closing due to inactivity. Feel free to open again on the repo (tokio-proto) that fits best. This repo is being reclaimed to implement tokio-rs/tokio-rfcs#3.
from tokio.
Related Issues (20)
- Document cancel safety of `AsyncReadExt`'s primitive read functions
- docs: specify the difference between `acquire` and `try_acquire` in the semaphore docs HOT 1
- tokio::select! with only an "else branch" HOT 1
- Allow runtime scaling of the number of workers HOT 1
- Automatically choose bind address in UDPSocket::connect HOT 5
- `assertion failed: next.is_notified()` during task dump with tokio v1.35.0 HOT 1
- Make AsyncFd::new return inner on error
- Documentation of `Runtime::enter` features unfortunate, slightly nondeterministic, and thus quite confusing example HOT 1
- Add worker id to `on_thread_park()` and `on_thread_unpark()` callbacks (for stuck worker watchdog) HOT 5
- Segmentation fault in `park_timeout()` on riscv64 HOT 7
- libunwind is compiled even with panic_immediate_abort HOT 6
- docsrs edge case when building docs without "net" feature HOT 1
- Cross-compiled builds often fail panic_in_block_on HOT 3
- Panic when using `tokio::net::windows::named_pipe` to process ipc
- Tokio 1.36.0, panic `SHUTDOWN.unpack(current) == 0 || matches!(tick, Tick :: Clear(_))` when using tokio::net::windows::named_pipe HOT 1
- [FEATURE_REQ] Add `recv_many` to StreamMap
- Add tokio version of `std::fs::File::set_times` HOT 1
- Windows Named pipes invalid memory access HOT 5
- tokio::fs::File::from_std() assumes current file position is zero
- `tokio_stream::wrappers::WatchStream` should take `AsRef<Receiver<T>>` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tokio.