upgrade rust and tokio + set max threads to num of cpus#357
upgrade rust and tokio + set max threads to num of cpus#357
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.
Is this the Rust version? Or why did you change it?
There was a problem hiding this comment.
this is the Rust version
There was a problem hiding this comment.
There was a problem hiding this comment.
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.
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 <luis@alantechnologies.com>", "David Ellis <david@alantechnologies.com>"] | ||
| edition = "2018" |
There was a problem hiding this comment.
I assumed this was the field you need to change?
There was a problem hiding this comment.
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.