Open Source RDBMS - Seamless, Scalable, Stable and Free

English | Login |Register

(click on this box to dismiss)

Is CUBRID less RAM consuming than innodb?


I have VPS with 1GB of RAM and few low traffic sites on it. But innodb is consuming a lot of RAM and my server sometimes shut down because of that. So I am wondering if CUBRID can help me.

Thank you for quick reply.

링크 댓글 쓰기 (0)
질문시간 2년 전

CUBRID consumes as much memory as you set by data_buffer_size parameter in the database server. By default the value is set to use 512MB per database. You can set it as low as 16MB. The greater the value of the data_buffer_size parameter, the more data stored on the disk can be cached in the memory, thus providing the advantage of decreased disk I/O cost.

However, if this parameter is too large, the buffer pool can be swapped out by the operating system because the system memory is excessively occupied. It is recommended to configure the data_buffer_size parameter in a way the required memory size is less than two-thirds of the system memory size.

Considering this, when you install CUBRID, you will find 3 configuration files in $CUBRID/conf directory:

  1. cubrid.conf
  2. cubrid.conf.large
  3. cubrid.conf.small

For those who deploy CUBRID on servers with 1GB RAM, we recommend using the configurations set in cubrid.conf.small file. Just rename the existing cubrid.conf to something like cubrid.conf.orig, then rename cubrid.conf.small file to cubrid.conf. Open this configuration file, and comment out the line which says: "COMMENT_THIS_LINE = TO_USE_THIS_CONFIGURATION".

In this "small" configuration file:

  • data_buffer_size is set to 256MB.
  • log_buffer_size = 2MB.
  • sort_buffer_size = 1MB.
  • max_clients = 50

For comparison and curiosity sake, open and see what values are set in other files.

Also, if you know that each of your databases store data less than 256MB, you can adjust data_buffer_size to some other smaller values (eg. 128MB). Once set, restart CUBRID service by typing:

cubrid service restart

Then for each database you plan to use, type the following command:

cubrid server start my_db_name

Alternatively, you can autostart some databases which you know you will always need. Once you start your DB, you will notice that RAM is used only by databases you specifically start this way. If databases are not started (cubrid server stop my_db_name), they do not use any memory.

링크 댓글 쓰기 (0)
답변시간 2년 전

You are either using a very old browser or a browser that is not supported.
In order to browse you need to have one of the following browsers:

Internet Explorer: Mozilla Firefox: Google Chrome: