Project

General

Profile

Actions

Bug #3040

open

performance: remove rrw_lock

Added by Vitaliy Gusev over 9 years ago. Updated over 9 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
2012-07-30
Due date:
% Done:

10%

Estimated time:
Difficulty:
Hard
Tags:
needs-triage
Gerrit CR:

Description

ZFS uses it's own rrw_lock.

rrw_lock is not real rw_lock because in internals it is mutex.

Therefore this brings HIGH cpu load when "readers" tries to get this rrw_lock on READ.

Below example of lockstat on 16 CPUs when plain "getattr" test is used.

for i in `seq 1 16`; do

./test_stat file-$i;
done

lockstat -b sleep 5

Adaptive mutex spin: 1556009 events in 5.157 seconds (301739 events/sec)

Count indv cuml rcnt Lock Caller
-------------------------------------------------------------------------------
845878 54% 54% 0.00 0xffffff0252a40550 rrw_enter_read+0x22
709974 46% 100% 0.00 0xffffff0252a40550 rrw_exit+0x1e
21 0% 100% 0.00 0xffffff02523c6740 dtrace_systrace_syscall32+0xaa


Files

teststat4.c (771 Bytes) teststat4.c test_stat - just call sys_stat in loop Vitaliy Gusev, 2012-07-31 12:32 PM
Actions

Also available in: Atom PDF