Whamcloud - gitweb
LU-15252 mdt: reduce contention at mdt_lsom_update 09/45709/5
authorAlexander Boyko <alexander.boyko@hpe.com>
Thu, 2 Dec 2021 09:43:54 +0000 (04:43 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 23 Dec 2021 07:16:51 +0000 (07:16 +0000)
commitc8b7afe4970415f8dae84f5e20661f8a3b3681a0
treefbc971f500142eff77cf69aef82add8f6431cd6c
parent2da8f7adbe4a0c3eeecf8fda44fb6a4e4f9a16dd
LU-15252 mdt: reduce contention at mdt_lsom_update

mot_som_mutex serialize all close requests with lsom updates for
a same mdt_object. For a massive open/read/close single shared
file load, it leads to high load avarage cause many threads sleep
on mutex.
This patch introduces a cached lsom size, and uses a mutex at update
part only. Close requests with lsom size less or equal to cached size
would not take a mutex at all.

Test results MPI open/flock/funlock/close SSF
10 iterations 10 node 100 thread each, 1000 file ops per thread
close time secs master patch MDT load avarage master patch
avg             0.142  0.086                  47.05  38.89
max             0.164  0.129                  49.39  44.77
min             0.097  0.041                  44.44  34.7

Signed-off-by: Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: I807b468b128295df9391b0467e74d4f10240662e
Reviewed-on: https://review.whamcloud.com/45709
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_som.c