# Resource問題

修改系統的max open files、max user processes (ulimit的使用方法) 目錄

/etc/pcp.env: fork: retry: 資源暫時無法取得\
/bin/sh: fork: retry: 資源暫時無法取得

```
cat /proc/sys/kernel/pid_max
32768
root@omvNAS1:/etc/default# sysctl kernel.pid_max
kernel.pid_max = 32768
```

系統使用遠遠超過

```
ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 128356
max locked memory       (kbytes, -l) 65536
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 128356
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
root@omvNAS1:/etc/default# ulimit -u
128356

```

x86\_64的最大限制為4194303，x86的最大限制為32767

nano /etc/sysctl.conf

```
.......................
kernel.pid_max = 4194303
```

sysctl -p

```
sysctl -p
dev.raid.speed_limit_min = 50000
dev.raid.speed_limit_max = 500000
kernel.pid_max = 4194303

```

## 修改max user processes

```
ulimit -u 300000
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kawsing.gitbook.io/opensystem/andoid-shou-ji/untitled/resource-wen-ti.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
