From 959be6676e56c4cd77a97c99eb9b2a228c2b9bba Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Mon, 13 Feb 2023 17:21:01 +0800 Subject: [PATCH] docs: how to change cachesize --- docs/en/12-taos-sql/02-database.md | 16 ++++++++++++++++ docs/zh/12-taos-sql/02-database.md | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/docs/en/12-taos-sql/02-database.md b/docs/en/12-taos-sql/02-database.md index 280d72697c..5e8c9aaa92 100644 --- a/docs/en/12-taos-sql/02-database.md +++ b/docs/en/12-taos-sql/02-database.md @@ -126,6 +126,22 @@ alter_database_option: { } ``` +### ALTER CACHESIZE + +The command of changing database configuration parameters is easy to use, but it's hard to determine whether a parameter is proper or not. In this section we will describe how to determine whether cachesize is big enough. + +1. How to check cachesize? + +You can use `select * from information_schema.ins_databases;` to get the value of cachesize. + +2. How to check cacheload? + +You can use `show .vgroups;` to check the value of cacheload. + +3. Determine whether cachesize is big engough + +If the value of `cacheload` is very close to the value of `cachesize`, then it's very probably that `cachesize` is too small. If the value of `cacheload` is much smaller than the value of `cachesize`, then `cachesize` is big enough. You can use this simple principle to determine. Depending on how much memory is available in your system, you can choose to double `cachesize` or incrase it by even 5 or more times. + :::note Other parameters cannot be modified after the database has been created. diff --git a/docs/zh/12-taos-sql/02-database.md b/docs/zh/12-taos-sql/02-database.md index b0a84af6dc..d9ef3b51aa 100644 --- a/docs/zh/12-taos-sql/02-database.md +++ b/docs/zh/12-taos-sql/02-database.md @@ -126,6 +126,22 @@ alter_database_option: { } ``` +### 修改 CACHESIZE + +修改数据库参数的命令使用简单,难的是如何确定是否需要修改以及如何修改。本小节描述如何判断数据库的 cachesize 是否够用。 + +1. 如何查看 cachesize? + +通过 select * from information_schema.ins_databases; 可以查看这些 cachesize 的具体值。 + +2. 如何查看 cacheload? + +通过 show .vgroups; 可以查看 cacheload + +3. 判断 cachesize 是否够用 + +如果 cacheload 非常接近 cachesize,则 cachesize 可能过小。 如果 cacheload 明显小于 cachesize 则 cachesize 是够用的。可以根据这个原则判断是否需要修改 cachesize 。具体修改值可以根据系统可用内存情况来决定是加倍或者是提高几倍。 + :::note 其它参数在 3.0.0.0 中暂不支持修改