#Limit CPU | Memory usage

21 messages · Page 1 of 1 (latest)

fickle notch
#

Is it possible to limit the cpu usage or the memory usage of an electron app ?
If so how ?
if not, is there any other alternative methods possible to do so ?

restive cedar
#

For what purpose?

fickle notch
#

So basically, I'm using node sharp to modify images in bulk, like 50+ At that time the CPU kranks upto 70-80%
I just wanted to reduce it to max of 20 maybe. Also I do not mind if the same process takes more time in 20% than in 80%

#

@restive cedar

restive cedar
#

You cant do so

#

Reduce amount of simultaneously convertion

fickle notch
#

ok angrysad

ornate scaffold
#

It works like that

#

do less stuff in the same amount of time

#

% is relative, maybe something that takes only 20% in a ryzen 7 5600X, will take 100% on a raspberry pi 2

ornate scaffold
#

but if you want to reduce overhead another option is to set the process in eco mode

#

or reduce priority

#

that might help without changing the code

restive cedar
#

may be something like that

#

i havent test it

fickle notch
#

oh hey guys, i forgot i had a post here 😅

fickle notch