Project

General

Profile

Actions

Bug #11547

open

[API] Excessive memory and time consumed by API and dispatch when container fields (like "mounts") are large

Added by Peter Amstutz about 7 years ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
-
Target version:
Story points:
-
Release:
Release relationship:
Auto

Description

arvados-cwl-runner created a container request that was about 75 MB of JSON. This caused huge memory bloat in the API server, paralyzed requests to both the containers and container_requests table (details on #11546), and resulted in memory bloat of other services as well, such as crunch-dispatch-slurm:

$ ps axv | grep crunch-dispatch-slurm
  PID TTY      STAT   TIME  MAJFL   TRS   DRS   RSS %MEM COMMAND
43366 ?        Sl    34:03   2248     0 3676584 2918600 10.1 /usr/bin/crunch-dispatch-slurm

crunch-dispatch-slurm does not use the "mounts" field, so it should not load it (or any other potentially large field it doesn't use).

The API server should use a more efficient procedure to achieve atomic "lock" and "unlock" (currently this process involves an unnecessary ActiveRecord load/save cycle).

If the API is still very slow after these changes, determine what makes it slow, and add some limits with suitable defaults.

In any case, arvados-cwl-runner should not produce huge container requests.


Files

current (27 KB) current Peter Amstutz, 04/25/2017 08:38 PM
huge.py (525 Bytes) huge.py Peter Amstutz, 04/27/2017 08:37 PM

Related issues

Related to Arvados - Bug #11548: workbench needs to handle API server timeouts betterNewActions
Related to Arvados - Bug #11546: Expensive container lock/unlockResolvedTom Clegg05/17/2017Actions
Related to Arvados - Bug #11549: [CWL] Avoid mounting individual filesResolvedPeter Amstutz04/27/2017Actions
Actions

Also available in: Atom PDF