On Nov 3, 2020, at 9:25 AM, Youbiao He <[email protected]> wrote: > I have installed lustre file system on CentOS. It works well when I write or > read files. But when I try to set the thread_started and thread_min for oss > services, I met the following problem.
It is always important to include the Lustre release version that you are using
in any problem report.
> To set parameters, I run: "sudo lctl set_param ost.OSS.ost.threads_started=36"
> then, I check the setting value by running: "lctl get_param
> ost.OSS.ost.threads_started", and then it shows
> "ost.OSS.ost.threads_started=21". So I can not change the parameter
> "ost.OSS.ost.threads_started".
The "threads_started" parameter is read-only, and lists the number of threads
currently running. I agree that "lctl set_param" should probably print an error
for the user in this case. You can see which parameters are writable by the
'=' after the parameter name:
$ lctl list_param -F ost.OSS.ost.threads*
ost.OSS.ost.threads_max=
ost.OSS.ost.threads_min=
ost.OSS.ost.threads_started
The underlying writable /proc or /sys files also has mode 644 instead of 444:
$ ls -l /proc/fs/lustre/ost/OSS/ost/threads_*
0 -rw-r--r-- 1 root root 0 Nov 3 15:53
/proc/fs/lustre/ost/OSS/ost/threads_max
0 -rw-r--r-- 1 root root 0 Nov 3 15:53
/proc/fs/lustre/ost/OSS/ost/threads_min
0 -r--r--r-- 1 root root 0 Nov 3 15:53
/proc/fs/lustre/ost/OSS/ost/threads_started
There *is* an non-zero command status returned to the caller, but it is not
obvious:
# lctl set_param ost.OSS.ost.threads_started=38
# echo $?
5
> Another problem is on the parameter "ost.OSS.ost.threads_min", When I set it
> to 10 using lctl, and it shows the parameter is set to 8, not 10.
In my testing, this seems to work OK:
# lctl get_param ost.OSS.ost.*thread*
ost.OSS.ost.threads_max=64
ost.OSS.ost.threads_min=3
ost.OSS.ost.threads_started=36
# lctl set_param ost.OSS.ost.threads_min=8
ost.OSS.ost.threads_min=8
# lctl get_param ost.OSS.ost.*thread*
ost.OSS.ost.threads_max=64
ost.OSS.ost.threads_min=8
ost.OSS.ost.threads_started=36
Writing to threads_min at runtime doesn't change the current number of running
threads. More service threads are only started when there are enough
concurrently processed requests to start new threads, but it will no longer
*stop* threads once threads_min is hit.
# lctl set_param ost.OSS.ost.threads_min=48
ost.OSS.ost.threads_min=48
# lctl get_param ost.OSS.ost.threads*
ost.OSS.ost.threads_max=64
ost.OSS.ost.threads_min=48
ost.OSS.ost.threads_started=36
Cheers, Andreas
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ lustre-discuss mailing list [email protected] http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org
