Symptom
Client ODC usually occupies about 2 GB of memory during running.
Possible causes
Chromium consumes memory resources when rendering pages
ODC is a cross-platform tool based on modern Web technologies. It uses the Electron framework for cross-platform development.
Electron uses Chromium to render pages. The memory usage of web ODC for rendering pages is basically the same as that of client ODC.
Memory usage of web ODC: 125 MB
Memory usage of client ODC: 126.2 MB
This design ensures the consistency between web ODC and client ODC and accelerates development.
However, it may cause memory issues because it is based on Chromium. To speed up the rendering process, Chromium will take up more memory to cache the required content when the system has sufficient memory. Chromium will actively release the cache when other processes demand memory resources. Therefore, the more memory available in the system, the larger the memory occupied by ODC, yet with small impact on other processes. However, after the cache is released, ODC page rendering will slow down.
Table data and result set data in ODC consumes memory
A query of table data and result sets in ODC also consumes a large amount of memory.
A query of table data and result sets pulls a large amount of data, which is stored in the memory. After you close the query window, the JavaScript engine does not immediately release the memory. The memory is released only in the next garbage collection. If the available memory is sufficient, the table data and result set data are retained in the memory for a longer period of time.
Java Web server consumes memory
Client ODC is embedded with a Java Web server. The Java program itself also consumes a large amount of memory resources. In general, on servers with more available memory, the JVM(Java Virtual Machine) will also use as much memory as possible to provide a better performance experience.
The ODC Java Web service occupies about 1 GB of memory.
Affected versions
All versions of client ODC
Solutions
We recommend that you deploy client ODC in an environment with 4 GB or more of available memory. If ODC is stuck or exits due to insufficient memory, make sure that the server has sufficient idle CPU and memory resources.
If a large number of users log on to a Windows server, you can restart the server to release resources.
When the memory usage of ODC is greater than 90% and ODC does not have any query with massive data, if the memory usage of ODC is 1 GB + Number of windows × 500 MB or higher for a long period of time, a memory leak may occur. In this case, contact OceanBase Technical Support for troubleshooting.
If multiple users use the same Windows Server simultaneously, the memory usage will be high. For example, many users may use the browser on the same bastion host to access ODC. In this case, we recommend that you use web ODC. In web ODC, the ODC server provides the computing and memory resources, which reduces the resource requirements on the Bastion host.