memory - How can I write code to purposefully eat up RAM and CPU resources? -


i have written code in ruby , c before has accomplished similar purposes, think situation bit trickier now. said, need purposefully write code ties resources on machine, , measure , when these events happen.

are there libraries/modules out there this, , if not, best way accomplish this? should flood processor huge numbers , make try find primes? should shoot tons of packets 1 of machines , wait till crashes?

i have spent past 2 days writing code accomplish various tasks related this, i'm dissatisfied because when accomplish task, can't real data out on where, why, , when these events happening. suggestions appreciated.

please consider using stress utility in linux. i'm assuming linux system. either way, "stress" allows target subsystem of choice , load accordingly.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -