Closed jouven closed 2 years ago
Yes, you can set RAYON_NUM_THREADS
environment variable.
This will work for almost every Rust program, because that's the config of one of the most popular multi-threading Rust libraries.
After some testing it seems I can make it work using RAYON_NUM_THREADS
plus parallel's -j
to limit the CPU, to limit the memory parallel's --memsuspend
seems to work. After tweaking these options the scripts executing in parallel don't end halfway anymore, before they were running out of resources
Thanks for the help
One of the features of this program is "Takes advantage of multi-core CPUs.", is there a way to limit or control that? this program is mostly unusable with parallel-like software (https://www.gnu.org/software/parallel/) because the core usage is not predictable as far as I know. I use a script to convert images depending on their dssim values and I've seen a single process of dssim at 1200 CPU% in htop, using 12 cores, which even if it's for a second or two, it makes parallelisation of dssim a problem, because it slows the computer substantially, this is on a 3900x with 32GB of ram, then again the images are pretty big resolution wise, 5xxx X 7xxx, which leads me to the issue of the memory usage, is there a way to know how much memory will it use? (knowing the image resolution/color depth), for the images I've previously mention, I've seen a single dssim process use 6-7GB of ram, still, ram usage is easier to control using parallel