Skip to content

Make the shared memory setting for new sessions more intuitive #1726

Open
@achimnol

Description

@achimnol

This is a late follow-up to lablup/backend.ai-webui#314.

Currently, the image label ai.backend.resource.min.mem is interpreted as the main memory size, excluding the shared memory size.However, the web UI's resource configuration automatically sets the shared memory size ($S$) to 64 MiB for the main memory sizes ($M$) less than 4 GiB, while our scheduler allocates the sum of the main memory size and the shared memory size ($M+S$).

This makes a confusion when allocating the least amount of memory $M+S = 256\ \mathrm{MiB}$, for instance, because it epic-fails as the web UI sends $M = 192\ \mathrm{MiB}$ and $S = 64\ \mathrm{MiB}$, while the manager's enqueue-session API handler compares the image label ai.backend.resource.min.mem with $M$ only and requires $M \ge 256\ \mathrm{MiB}$.

We are going to update the web UI to hide the detailed shared memory configuration for most use cases, and the memory resource slider will expose $M+S$ with auto-configured $S$ depending on the value of $M + S$.

To better support the above web UI update, let's change the enqueue-session API handler to:

  • Compare ai.backend.resource.min.mem with $M+S$ instead of $M$.

  • Raise an explicit input validation error if $S > M$, to prevent situations like $M = 0$ wihle $S = 1\ \mathrm{GiB}$.
    The Client SDK and CLI should still expose the raw configurations as the options. So, let's:

  • Update the CLI's help texts to be explicitly consistent with the above changes.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions