-
Notifications
You must be signed in to change notification settings - Fork 12
upgrade rust and tokio + set max threads to num of cpus #357
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
Conversation
|
This doesn't actually fix the real issue of #354 which is that we're still creating a tokio task per array element, which explodes the AVM with an OOM on large arrays unnecessarily (also because we duplicate the working memory for each task right now, so we get array size to the array size amount of memory consumption) |
| documentation = "https://docs.alan-lang.org" | ||
| repository = "https://github.com/alantech/alan" | ||
| version = "0.1.22" | ||
| version = "0.1.48" |
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.
Is this the Rust version? Or why did you change it?
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.
this is the Rust version
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.
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.
It appears you can't specify the Rust compiler version in Cargo? emk/heroku-buildpack-rust#11 That explains why we've had such difficulties with the submitted projects compiling on our laptops.
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.
Tracing through several years of github issues leads me to: rust-lang/rustup#1172
We apparently need to add a rust-toolchain file that contains, as far as I can tell, only the version of rust that we want to use?
| version = "0.1.22" | ||
| version = "0.1.48" | ||
| authors = ["Luis de Pombo <[email protected]>", "David Ellis <[email protected]>"] | ||
| edition = "2018" |
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 assumed this was the field you need to change?
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.
Initially, I thought so too
|
It looks like this upgrade also broke the HTTP client and server code :/ |
I see. To some extent I did not understand the issue correctly. It should not spin one thread per array element, but also it should not spin on task per array element. Since tokio uses a work stealing mechanism this addresses the former, but not the latter. |
Yeah, I think this is a bug between |
...that's crazy! What else would you mean by "enable_all"? |
So it turns out that it was silently failing because the latest version of |
No description provided.