I want to limit the memory and cpu a process can use, because it is overloading my PC.
I open a terminal, run
ulimit -v 4192000, run the process, open another terminal and run
cpulimit -p pid_of_the_process -l 50.
Well... first the cpu limit isn't working, it reaches peaks of 90% or even 100% on random cores (I have four). And second, when the terminal where I launched the process reaches the 4 GB of memory, the process gets killed instead of keep running with 4 GB.