Sometimes, a plug-in consumes more memory than what has been allocated to it by the plug-in author or Che defaults. An example of such a case is the use of a language server with a project that has many source files (&8gt; 10 000). RAM consumption in such circumstanes needs to be tuned, otherwise the machine that runs the Che workspaces kills the process with an out-of-memory error (OOM) error.
Users can override the RAM limit for a particular plug-in in their workspace configuration.
-
Set the workspace attribute
sidecar.<plugin ID>.memory_limitto1000Mor10Gi, or any other value formatted as a number and a unit (b, k, ki, m, mi, g, gi). When no unit is specified, the number is in bytes.
Using this notation, units that contain the character i, denote a number that is of the power 2, such as 1024 (as opposed to numbers that use a power of 10, such as 1000).
|
Example of an attribute that sets the RAM limit for the YAML language server plug-in to 768 mebibytes (1073741824 bytes):
"attributes": {
"Sidecar.redhat.vscode-yaml.memory_limit": "768mi"
}