-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable tuning parameters #233
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! One thing I'd like to see configurable would be the frequency of the task switching; but we can do that in another PR of course :)
Good idea! I'll put it on my TODO list 👍 |
I'm a bit disappointed that the links point to the esp-idf docs where all the help we get (for the booleans) is "you can say if you want this or not". This is:
Unfortunately, this isn't the first time I've had this same exact problem with IDF documentation... Oh well, at least we have more configurability 👍 Do you think we could get configurable country info the same way? |
Yes - I also have no idea what those things really do t.b.h. .... If I had I had written it down 😆 At least something changes performance-wise. But there is hope that someday someone will enlighten us in the IDF docs
Good idea! I'll add it to my ever-growing list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've compared to the current Kconfig and found these differences in the defaults. I wonder if these may cause some of the perf difference, but I obviously have no idea :) I wonder where the esp-wifi numbers come from, or why they are not the same as in esp-idf.
Sorry for poking my nose in this :)
static_rx_buf_num: usize, | ||
#[default(32)] | ||
dynamic_rx_buf_num: usize, | ||
#[default(0)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
esp-idf default is 16
dynamic_tx_buf_num: usize, | ||
#[default(0)] | ||
ampdu_rx_enable: usize, | ||
#[default(0)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
esp-idf default is 1
static_tx_buf_num: usize, | ||
#[default(32)] | ||
dynamic_tx_buf_num: usize, | ||
#[default(0)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
esp-idf default is 1
Interesting - I think I took the defaults from ESP-IDF when I did the initial implementation ... maybe they were different back then or I just failed at the attempt Good to know anyway. We should test on all targets with these defaults. Thanks for pointing this out |
This adds the ability to fine-tune some parameters.
We currently use some sane defaults for a few things. However for best performance it's needed to allow changing those.
Going with Cargo features won't be a good idea so this introduces cfg-toml for configuration. I think in future we should also make the WIFI-HEAP and MTU configurable via this mechanism. But that is something for another PR.
Testing this on ESP32-C3 (suggestion). (Note: the exact values won't work the same or at all for other chips)
devserver --address <LOCALIP>:80
in that directoryChange the
dns.rs
example to download from your computer and extremely bump some buffersChange the IP address to match your setting. Set SSID/PASSWORD to match your computer's hotspot.
Add this as
cfg.toml
in the root of the workspace:Run the example
cargo run --example dns --release --features "wifi"
and see the bytes/second.Remove the
cfg.toml
and re-run ... you should see a difference.Please note: The extreme buffer sizes etc. probably won't work as is for other chips. However it shows users can change the settings.