Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ To use IoTDB, you need to have:
1. Java >= 1.8 (1.8, 11, and 15 are verified. Please make sure the environment path has been set accordingly).
2. Maven >= 3.6 (If you want to compile and install IoTDB from source code).
3. Set the max open files num as 65535 to avoid "too many open files" error.
4. (Optional) Set the somaxconn as 65535 to avoid "connection reset" error when the system is under high load.
```
# Linux
> sudo sysctl -w net.core.somaxconn=65535

# FreeBSD or Darwin
> sudo sysctl -w kern.ipc.somaxconn=65535
```

## Installation

Expand Down
8 changes: 8 additions & 0 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ IoTDB的主要特点如下:
1. Java >= 1.8 (目前 1.8、11和15 已经被验证可用。请确保环变量境路径已正确设置)。
2. Maven >= 3.6 (如果希望从源代码编译和安装IoTDB)。
3. 设置 max open files 为 65535,以避免"too many open files"错误。
4. (可选) 将 somaxconn 设置为 65535 以避免系统在高负载时出现 "connection reset" 错误。
```
# Linux
> sudo sysctl -w net.core.somaxconn=65535

# FreeBSD or Darwin
> sudo sysctl -w kern.ipc.somaxconn=65535
```

## 安装

Expand Down
10 changes: 10 additions & 0 deletions docs/Download/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ Legacy version are available here: [https://archive.apache.org/dist/iotdb/](http

**<font color=red>Attention</font>**:

- Recommended OS parameters
* Set the somaxconn as 65535 to avoid "connection reset" error when the system is under high load.
```
# Linux
> sudo sysctl -w net.core.somaxconn=65535

# FreeBSD or Darwin
> sudo sysctl -w kern.ipc.somaxconn=65535
```

- How to upgrade a minor version (e.g., from v0.11.0 to v0.11.3)?
* versions which have the same major version are compatible.
* Just download and unzip the new version. Then modify the configuration files to keep consistent
Expand Down
12 changes: 11 additions & 1 deletion docs/zh/Download/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,17 @@

历史版本下载:[https://archive.apache.org/dist/iotdb/](https://archive.apache.org/dist/iotdb/)

**<font color=red>升级注意事项</font>**:
**<font color=red>注意事项</font>**:

- 推荐修改的操作系统参数
* 将 somaxconn 设置为 65535 以避免系统在高负载时出现 "connection reset" 错误。
```
# Linux
> sudo sysctl -w net.core.somaxconn=65535

# FreeBSD or Darwin
> sudo sysctl -w kern.ipc.somaxconn=65535
```

- 如何升级小版本 (例如,从 v0.11.0 to v0.11.2)?
* 同一个大版本下的多个小版本是互相兼容的。
Expand Down
27 changes: 27 additions & 0 deletions server/src/assembly/resources/conf/iotdb-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,33 @@ if [ $max_num -le 65535 ]; then
fi
fi

# Set somaxconn to a better value to avoid meaningless connection reset issues when the system is under high load.
# The original somaxconn will be set back when the system reboots.
# For more detail, see: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=19f92a030ca6d772ab44b22ee6a01378a8cb32d4
SOMAXCONN=65535
case "$(uname)" in
Linux)
somaxconn=$(sysctl net.core.somaxconn | awk '{print $2}')
if [ "$somaxconn" -lt $SOMAXCONN ]; then
echo "WARN:"
echo "WARN: the value of net.core.somaxconn (=$somaxconn) is too small, please set it to a larger value using the following command."
echo "WARN: sudo sysctl -w net.core.somaxconn=$SOMAXCONN"
echo "WARN: The original net.core.somaxconn value will be set back when the os reboots."
echo "WARN:"
fi
;;
FreeBSD | Darwin)
somaxconn=$(sysctl kern.ipc.somaxconn | awk '{print $2}')
if [ "$somaxconn" -lt $SOMAXCONN ]; then
echo "WARN:"
echo "WARN: the value of kern.ipc.somaxconn (=$somaxconn) is too small, please set it to a larger value using the following command."
echo "WARN: sudo sysctl -w kern.ipc.somaxconn=$SOMAXCONN"
echo "WARN: The original kern.ipc.somaxconn value will be set back when the os reboots."
echo "WARN:"
fi
;;
esac

calculate_heap_sizes()
{
case "`uname`" in
Expand Down