Project

General

Profile

Actions

Bug #3988

closed

kstat(1) woefully inefficient on fully specified kstats

Added by Robert Mustacchi almost 8 years ago. Updated almost 8 years ago.

Status:
Resolved
Priority:
Normal
Category:
cmd - userland programs
Start date:
2013-08-04
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Currently, kstat is woefully inefficient on fully specified kstats, e.g.:

[root@headnode (bh1-kvm6) /var/tmp]# ptime /usr/bin/kstat -p -m unix -n system_misc -s boot_time > /dev/null

real        0.312228467
user        0.267776579
sys         0.044044015

The reason for this is a simple logic error: when filtering out kstats, kstat(1) mistakenly reads any kstat that matches the specified module or the specified name, instead of the specified module and the specified name. Making the two character change results in a significant speedup:

[root@headnode (bh1-kvm6) /var/tmp]# ptime /var/tmp/kstat -p -m unix -n system_misc -s boot_time > /dev/null

real        0.019144410
user        0.006114901
sys         0.012684514
Actions #1

Updated by Robert Mustacchi almost 8 years ago

  • Status changed from Pending RTI to Resolved

Resolved in 9736aecd323ba323a24c159dc877b29795d68a0a.

Actions

Also available in: Atom PDF