Page MenuHomePhabricator

Set Resource Limits on wasmedge CLI
Closed, ResolvedPublic

Description

Description

The wasmedge CLI provides three flags to bound resource consumption by processes run inside the runtime:

--time-limit to set a time limit;
--gas-limit to set something like a CPU limit (each operation is assigned a "gas" cost, so only a certain number of operations is permitted before the process dies);
--memory-page-limit to set memory usage limits

These flags provide an added layer of protection against DoS attacks.

Desired behavior/Acceptance criteria (returned value, expected error, performance expectations, etc.)

  • these flags are used in wasmedge incantations;
  • reasonable initial values for these flags are determined;
  • we also measure memory/"gas" usage and include these things in metadata in order to make data-driven decisions about these flags' values in future

Completion checklist

  • --enable-all-statistics and return some statistics as metadata;
  • using the above information, set reasonable limits with --time-limit, --gas-limit, and --memory-page-limit;
  • consider enabling only the used statistics (i.e., with the stat-specific flags rather than --enable-all-statistics)

Event Timeline

DVrandecic moved this task from To Triage to Backlog on the Abstract Wikipedia team board.
cmassaro changed the task status from Open to In Progress.Mar 21 2024, 11:27 PM
cmassaro claimed this task.
cmassaro moved this task from Backlog to In Progress on the Abstract Wikipedia team board.

Change #1017061 had a related patch set uploaded (by Jforrester; author: Jforrester):

[operations/deployment-charts@master] wikifunctions: Upgrade evaluators from 2024-02-26-150300 to 2024-04-03-210033

https://gerrit.wikimedia.org/r/1017061

Change #1017061 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Upgrade evaluators from 2024-02-26-150300 to 2024-04-03-210033

https://gerrit.wikimedia.org/r/1017061

Change #1021507 had a related patch set uploaded (by Jforrester; author: Jforrester):

[operations/deployment-charts@master] wikifunctions: Upgrade evaluators from 2024-04-03-210033 to 2024-04-18-150843

https://gerrit.wikimedia.org/r/1021507

Change #1021507 merged by jenkins-bot:

[operations/deployment-charts@master] wikifunctions: Upgrade evaluators from 2024-04-03-210033 to 2024-04-18-150843

https://gerrit.wikimedia.org/r/1021507