Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to limit Deno memory and cpu usage

Tags:

deno

How can I limit Deno RAM and CPU usage when running js/ts scripts?

deno run https://deno.land/[email protected]/examples/welcome.ts
like image 501
Ivaylo Hristov Avatar asked Nov 16 '22 00:11

Ivaylo Hristov


1 Answers

Besides using the container as sugessted in comments:

  --max-old-space-size (max size of the old space (in Mbytes))
        type: size_t  default: --max-old-space-size=0
  --max-heap-size (max size of the heap (in Mbytes) both max_semi_space_size and max_old_space_size take precedence. All three flags cannot be specified at the same time.)
        type: size_t  default: --max-heap-size=0
like image 157
BogdanBiv Avatar answered Mar 20 '23 16:03

BogdanBiv