[lustre-discuss] Cannot set ost.OSS.ost.thread_started

Andreas Dilger adilger at dilger.ca
Tue Nov 3 15:00:28 PST 2020

On Nov 3, 2020, at 9:25 AM, Youbiao He <yh54 at iastate.edu> 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*

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 $?

> 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*
    # lctl set_param ost.OSS.ost.threads_min=8
    # lctl get_param ost.OSS.ost.*thread*

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
    # lctl get_param ost.OSS.ost.threads*

Cheers, Andreas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 873 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.lustre.org/pipermail/lustre-discuss-lustre.org/attachments/20201103/1c84d66c/attachment.sig>

More information about the lustre-discuss mailing list