Add more information on vm map count setting (#241)

### What problem does this PR solve?

_Briefly describe what this PR aims to solve. Include background context
that will help reviewers understand the purpose of the PR._

Issue link:#[[Link the issue
here](https://github.com/infiniflow/ragflow/issues/236)]

### Type of change

- [x] Documentation Update
This commit is contained in:
KevinHuSh 2024-04-07 09:41:53 +08:00 committed by GitHub
parent 23b448cf96
commit bb96180e77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 76 additions and 10 deletions

View File

@ -70,7 +70,7 @@
### 🚀 Start up the server
1. Ensure `vm.max_map_count` > 65535:
1. Ensure `vm.max_map_count` >= 262144 ([more](./docs/max_map_count.md)):
> To check the value of `vm.max_map_count`:
>
@ -78,7 +78,7 @@
> $ sysctl vm.max_map_count
> ```
>
> Reset `vm.max_map_count` to a value greater than 65535 if it is not.
> Reset `vm.max_map_count` to a value at least 262144 if it is not.
>
> ```bash
> # In this case, we set it to 262144:
@ -104,7 +104,7 @@
$ docker compose up -d
```
> The core image is about 15 GB in size and may take a while to load.
> The core image is about 9 GB in size and may take a while to load.
4. Check the server status after having the server up and running:
@ -129,7 +129,7 @@
```
5. In your web browser, enter the IP address of your server as prompted and log in to RAGFlow.
> In the given scenario, you only need to enter `http://172.22.0.5` (sans port number) as the default HTTP serving port `80` can be omitted when using the default configurations.
> In the given scenario, you only need to enter `http://IP_of_RAGFlow ` (sans port number) as the default HTTP serving port `80` can be omitted when using the default configurations.
6. In [service_conf.yaml](./docker/service_conf.yaml), select the desired LLM factory in `user_default_llm` and update the `API_KEY` field with the corresponding API key.
> See [./docs/llm_api_key_setup.md](./docs/llm_api_key_setup.md) for more information.

View File

@ -66,11 +66,11 @@
- CPU >= 2 cores
- RAM >= 8 GB
- Docker
> ローカルマシンWindows、Mac、または Linuxに Docker をインストールしていない場合は、[Docker Engine のインストール](https://docs.docker.com/engine/install/)を参照してください。
> ローカルマシンWindows、Mac、または Linuxに Docker をインストールしていない場合は、[Docker Engine のインストール](https://docs.docker.com/engine/install/) を参照してください。
### 🚀 サーバーを起動
1. `vm.max_map_count` > 65535 であることを確認する:
1. `vm.max_map_count` >= 262144 であることを確認する【[もっと](./docs/max_map_count.md)】:
> `vm.max_map_count` の値をチェックするには:
>
@ -78,7 +78,7 @@
> $ sysctl vm.max_map_count
> ```
>
> `vm.max_map_count`65535 より大きい値でなければリセットする。
> `vm.max_map_count`262144 より大きい値でなければリセットする。
>
> ```bash
> # In this case, we set it to 262144:

View File

@ -70,7 +70,7 @@
### 🚀 启动服务器
1. 确保 `vm.max_map_count` 大于 65535
1. 确保 `vm.max_map_count` 不小于 262144 【[更多](./docs/max_map_count.md)】
> 如需确认 `vm.max_map_count` 的大小:
>
@ -78,7 +78,7 @@
> $ sysctl vm.max_map_count
> ```
>
> 如果 `vm.max_map_count` 的值不大于 65535,可以进行重置:
> 如果 `vm.max_map_count` 的值小于 262144,可以进行重置:
>
> ```bash
> # 这里我们设为 262144:

66
docs/max_map_count.md Normal file
View File

@ -0,0 +1,66 @@
# Set vm.max_map_count to at least 262144
## Linux
To check the value of `vm.max_map_count`:
```bash
$ sysctl vm.max_map_count
```
Reset `vm.max_map_count` to a value at least 262144 if it is not.
```bash
# In this case, we set it to 262144:
$ sudo sysctl -w vm.max_map_count=262144
```
This change will be reset after a system reboot. To ensure your change remains permanent, add or update the `vm.max_map_count` value in **/etc/sysctl.conf** accordingly:
```bash
vm.max_map_count=262144
```
## Mac
```bash
$ screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty
$ sysctl -w vm.max_map_count=262144
```
To exit the screen session, type Ctrl a d.
## Windows and macOS with Docker Desktop
The vm.max_map_count setting must be set via docker-machine:
```bash
$ docker-machine ssh
$ sudo sysctl -w vm.max_map_count=262144
```
## Windows with Docker Desktop WSL 2 backend
To manually set it every time you reboot, you must run the following commands in a command prompt or PowerShell window every time you restart Docker:
```bash
$ wsl -d docker-desktop -u root
$ sysctl -w vm.max_map_count=262144
```
If you are on these versions of WSL and you do not want to have to run those commands every time you restart Docker, you can globally change every WSL distribution with this setting by modifying your %USERPROFILE%\.wslconfig as follows:
```bash
[wsl2]
kernelCommandLine = "sysctl.vm.max_map_count=262144"
```
This will cause all WSL2 VMs to have that setting assigned when they start.
If you are on Windows 11, or Windows 10 version 22H2 and have installed the Microsoft Store version of WSL, you can modify the /etc/sysctl.conf within the "docker-desktop" WSL distribution, perhaps with commands like this:
```bash
$ wsl -d docker-desktop -u root
$ vi /etc/sysctl.conf
```
and appending a line which reads:
```bash
vm.max_map_count = 262144
```

View File

@ -60,7 +60,7 @@ class Docx(DocxParser):
html += f"<td>{c.text}</td>" if span == 1 else f"<td colspan='{span}'>{c.text}</td>"
html += "</tr>"
html += "</table>"
tbls.append(((None, html), ""))
tbls.append(((None, html), ""))
return [(l, "") for l in lines if l], tbls