Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Sep 2012 11:21:16 -0700
From:      David O'Brien <obrien@FreeBSD.org>
To:        Ian Lepore <freebsd@damnhippie.dyndns.org>
Cc:        Arthur Mesh <arthurmesh@gmail.com>, freebsd-security@FreeBSD.ORG, Doug Barton <dougb@FreeBSD.ORG>, freebsd-rc@FreeBSD.ORG, Mark Murray <markm@FreeBSD.ORG>
Subject:   Re: svn commit: r239598 - head/etc/rc.d
Message-ID:  <20120906182116.GD13179@dragon.NUXI.org>
In-Reply-To: <1346945964.59094.147.camel@revolution.hippie.lan>
References:  <201208222337.q7MNbORo017642@svn.freebsd.org> <5043E449.8050005@FreeBSD.org> <1346638718.1140.573.camel@revolution.hippie.lan> <50451041.9070302@FreeBSD.org> <1346789717.1140.675.camel@revolution.hippie.lan> <20120905204050.GB820@dragon.NUXI.org> <1346945964.59094.147.camel@revolution.hippie.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 06, 2012 at 09:39:24AM -0600, Ian Lepore wrote:
> On Wed, 2012-09-05 at 13:40 -0700, David O'Brien wrote:

> Of those oids you listed above, the vm and vfs generate a lot of text
> but it's mostly the vm.stats part that changes.  The kern.geom output is
> pretty static on a given system, and oddly it takes a long time to
> generate compared to other oids.  The cp_time is already included in
> cp_times.  The dev.cpu is intel-specific.

I'm not seeing that 'cp_time's specific values are in 'cp_times'.
I have not looked at how easy it is to derive 'cp_time' given
'cp_times' output.


> 
>  0.30s - Your list above
>  0.18s - Your list minus kern.cp_time and vfs, changing vm to vm.stats
>  0.05s - Also remove kern.geom

Below is the diff between two different boots of my sysctl MIB list.

I did not dig into why, but kern.geom varies between boots.
As did other vm (non-vm.stats) values. The impact of formatting
'kern.geom.confdot' and XML formatting of 'kern.geom.confxml' is
likely the large part of the .13s difference.

Can you measure my list minus kern.geom (keeping kern.cp_time and vfs
and vm).


> So, to reiterate, this is the set of oids that takes only .05s:
>         kern.cp_times kern.lastpid kern.timecounter kern.tty_nout
>         kern.tty_nin vm.stats

At this point I am liking:
	sysctl kern.cp_times kern.cp_time kern.lastpid kern.timecounter \
	    kern.tty_nout kern.tty_nin vm vfs debug dev.cpu \
	    | tr -Cd '0123456789xabcdef'

-- 
-- David  (obrien@FreeBSD.org)

@@ -1,2 +1,2 @@
-kern.cp_times: 4 0 568 3 548 22 0 36 42 397
-kern.cp_time: 26 0 604 45 945
+kern.cp_times: 102 0 636 6 8801479 104 0 126 52 8801316
+kern.cp_time: 206 0 762 58 17602795
@@ -33 +33 @@ z0xfffffe000b134300 [shape=box,label="DI
-z0xfffffe000b133d00 [shape=hexagon,label="ada0\nr1w1e3\nerr#0"];
+z0xfffffe000b133d00 [shape=hexagon,label="ada0\nr2w2e5\nerr#0"];
@@ -144 +144 @@ z0xfffffe000b188700 [shape=box,label="PA
-z0xfffffe000b188300 [label="r1w1e2"];
+z0xfffffe000b188300 [label="r2w2e3"];
@@ -147 +147 @@ z0xfffffe000b188700 -> z0xfffffe000b1883
-z0xfffffe000b158b00 [shape=hexagon,label="ada0s1b\nr0w0e0\nerr#0"];
+z0xfffffe000b158b00 [shape=hexagon,label="ada0s1b\nr1w1e0\nerr#0"];
@@ -152 +152 @@ z0xfffffe000b18e100 [shape=box,label="PA
-z0xfffffe000b18db00 [label="r1w1e3"];
+z0xfffffe000b18db00 [label="r2w2e5"];
@@ -161 +161 @@ z0xfffffe000b18c900 -> z0xfffffe000b18e1
-z0xfffffe000b18cd00 [shape=hexagon,label="ada0s1\nr1w1e2\nerr#0"];
+z0xfffffe000b18cd00 [shape=hexagon,label="ada0s1\nr2w2e3\nerr#0"];
@@ -184,0 +185,4 @@ z0xfffffe000b1f5500 -> z0xfffffe000b1e8d
+z0xfffffe000b204900 [shape=box,label="SWAP\nswap\nr#4"];
+z0xfffffe000b204500 [label="r1w1e0"];
+z0xfffffe000b204500 -> z0xfffffe000b158b00;
+z0xfffffe000b204900 -> z0xfffffe000b204500;
@@ -240 +244 @@ kern.geom.confxml: <mesh>
-	  <mode>r1w1e3</mode>
+	  <mode>r2w2e5</mode>
@@ -700 +704 @@ kern.geom.confxml: <mesh>
-	  <mode>r1w1e2</mode>
+	  <mode>r2w2e3</mode>
@@ -706 +710 @@ kern.geom.confxml: <mesh>
-	  <mode>r0w0e0</mode>
+	  <mode>r1w1e0</mode>
@@ -758 +762 @@ kern.geom.confxml: <mesh>
-	  <mode>r1w1e3</mode>
+	  <mode>r2w2e5</mode>
@@ -818 +822 @@ kern.geom.confxml: <mesh>
-	  <mode>r1w1e2</mode>
+	  <mode>r2w2e3</mode>
@@ -944,0 +949,10 @@ kern.geom.confxml: <mesh>
+    <geom id="0xfffffe000b204900">
+      <class ref="0xffffffff81161ea0"/>
+      <name>swap</name>
+      <rank>4</rank>
+	<consumer id="0xfffffe000b204500">
+	  <geom ref="0xfffffe000b204900"/>
+	  <provider ref="0xfffffe000b158b00"/>
+	  <mode>r1w1e0</mode>
+	</consumer>
+    </geom>
@@ -975 +989 @@ kern.geom.raid.raid1e.rebuild_slab_size:
-kern.lastpid: 51
+kern.lastpid: 134
@@ -982 +996 @@ kern.timecounter.tc.i8254.mask: 65535
-kern.timecounter.tc.i8254.counter: 43141
+kern.timecounter.tc.i8254.counter: 21189
@@ -986 +1000 @@ kern.timecounter.tc.HPET.mask: 429496729
-kern.timecounter.tc.HPET.counter: 253448303
+kern.timecounter.tc.HPET.counter: 386878246
@@ -990 +1004 @@ kern.timecounter.tc.ACPI-fast.mask: 1677
-kern.timecounter.tc.ACPI-fast.counter: 4125532
+kern.timecounter.tc.ACPI-fast.counter: 3928587
@@ -994 +1008 @@ kern.timecounter.tc.TSC-low.mask: 429496
-kern.timecounter.tc.TSC-low.counter: 677311549
+kern.timecounter.tc.TSC-low.counter: 848167747
@@ -999,2 +1013,2 @@ kern.timecounter.invariant_tsc: 1
-kern.tty_nout: 259
-kern.tty_nin: 0
+kern.tty_nout: 11221
+kern.tty_nin: 317
@@ -1006 +1020 @@ Virtual Memory:		(Total: 1073859128K Act
-Real Memory:		(Total: 105764K Active: 10752K)
+Real Memory:		(Total: 107320K Active: 10856K)
@@ -1008,2 +1022,2 @@ Shared Virtual Memory:	(Total: 13964K Ac
-Shared Real Memory:	(Total: 9388K Active: 1184K)
-Free Memory Pages:	2834004K
+Shared Real Memory:	(Total: 9404K Active: 1200K)
+Free Memory Pages:	2828664K
@@ -1011 +1025 @@ Free Memory Pages:	2834004K
-vm.loadavg: { 3.54 0.78 0.28 }
+vm.loadavg: { 0.00 0.00 0.00 }
@@ -1022,2 +1036,2 @@ vm.md_malloc_wait: 0
-vm.kmem_map_free: 3055230976
-vm.kmem_map_size: 6223388672
+vm.kmem_map_free: 3054096384
+vm.kmem_map_size: 6224523264
@@ -1029,2 +1043,2 @@ vm.redzone.panic: 0
-vm.redzone.extra_mem: 19765344
-vm.nswapdev: 0
+vm.redzone.extra_mem: 19775024
+vm.nswapdev: 1
@@ -1035 +1049 @@ vm.swap_reserved: 47616000
-vm.swap_total: 0
+vm.swap_total: 8493465600
@@ -1060 +1074 @@ vm.exec_map_entries: 16
-vm.stats.misc.zero_page_count: 1
+vm.stats.misc.zero_page_count: 28
@@ -1064,2 +1078,2 @@ vm.stats.vm.v_rforkpages: 0
-vm.stats.vm.v_vforkpages: 350
-vm.stats.vm.v_forkpages: 1132
+vm.stats.vm.v_vforkpages: 1257
+vm.stats.vm.v_forkpages: 3781
@@ -1068,2 +1082,2 @@ vm.stats.vm.v_rforks: 0
-vm.stats.vm.v_vforks: 10
-vm.stats.vm.v_forks: 23
+vm.stats.vm.v_vforks: 36
+vm.stats.vm.v_forks: 80
@@ -1075 +1089 @@ vm.stats.vm.v_cache_count: 0
-vm.stats.vm.v_inactive_count: 564
+vm.stats.vm.v_inactive_count: 1045
@@ -1077,3 +1091,3 @@ vm.stats.vm.v_inactive_target: 30391
-vm.stats.vm.v_active_count: 4302
-vm.stats.vm.v_wire_count: 41709
-vm.stats.vm.v_free_count: 708500
+vm.stats.vm.v_active_count: 4383
+vm.stats.vm.v_wire_count: 42469
+vm.stats.vm.v_free_count: 707165
@@ -1085,2 +1099,2 @@ vm.stats.vm.v_page_size: 4096
-vm.stats.vm.v_tfree: 58362
-vm.stats.vm.v_pfree: 1604
+vm.stats.vm.v_tfree: 203414
+vm.stats.vm.v_pfree: 10339
@@ -1092 +1106 @@ vm.stats.vm.v_reactivated: 0
-vm.stats.vm.v_intrans: 4
+vm.stats.vm.v_intrans: 5
@@ -1094 +1108 @@ vm.stats.vm.v_vnodepgsout: 0
-vm.stats.vm.v_vnodepgsin: 576
+vm.stats.vm.v_vnodepgsin: 1115
@@ -1096 +1110 @@ vm.stats.vm.v_vnodeout: 0
-vm.stats.vm.v_vnodein: 59
+vm.stats.vm.v_vnodein: 120
@@ -1102,11 +1116,11 @@ vm.stats.vm.v_ozfod: 0
-vm.stats.vm.v_zfod: 48275
-vm.stats.vm.v_cow_optim: 3
-vm.stats.vm.v_cow_faults: 954
-vm.stats.vm.v_vm_faults: 65943
-vm.stats.sys.v_soft: 520
-vm.stats.sys.v_intr: 150022
-vm.stats.sys.v_syscall: 40465
-vm.stats.sys.v_trap: 53007
-vm.stats.sys.v_swtch: 9919
-vm.stats.object.bypasses: 7
-vm.stats.object.collapses: 67
+vm.stats.vm.v_zfod: 183444
+vm.stats.vm.v_cow_optim: 12
+vm.stats.vm.v_cow_faults: 3446
+vm.stats.vm.v_vm_faults: 217442
+vm.stats.sys.v_soft: 3223136
+vm.stats.sys.v_intr: 3339722
+vm.stats.sys.v_syscall: 195460
+vm.stats.sys.v_trap: 202403
+vm.stats.sys.v_swtch: 9642368
+vm.stats.object.bypasses: 16
+vm.stats.object.collapses: 257
@@ -1155,10 +1169,10 @@ FREE LIST 0:
-  11 (  8192K)  |       1  |       1  |       0
-  10 (  4096K)  |       1  |       1  |       0
-   9 (  2048K)  |       0  |       0  |       0
-   8 (  1024K)  |       1  |       0  |       0
-   7 (   512K)  |       0  |       0  |       0
-   6 (   256K)  |       1  |       1  |       0
-   5 (   128K)  |       1  |       0  |       0
-   4 (    64K)  |       0  |       1  |       0
-   3 (    32K)  |       0  |       0  |       0
-   2 (    16K)  |       0  |       1  |       0
+  11 (  8192K)  |       0  |       1  |       0
+  10 (  4096K)  |       1  |       0  |       0
+   9 (  2048K)  |       1  |       1  |       0
+   8 (  1024K)  |       1  |       1  |       0
+   7 (   512K)  |       1  |       1  |       0
+   6 (   256K)  |       0  |       1  |       0
+   5 (   128K)  |       2  |       0  |       0
+   4 (    64K)  |       2  |       1  |       0
+   3 (    32K)  |       1  |       3  |       0
+   2 (    16K)  |       0  |       4  |       0
@@ -1191 +1205 @@ LEVEL     SIZE  NUMBER
-   -1:  37264K,     23
+   -1:  37892K,     23
@@ -1193 +1207 @@ LEVEL     SIZE  NUMBER
-vm.reserv.freed: 154
+vm.reserv.freed: 602
@@ -1199,2 +1213,2 @@ vm.pmap.pdpe.demotions: 0
-vm.pmap.pde.promotions: 129
-vm.pmap.pde.p_failures: 10168
+vm.pmap.pde.promotions: 415
+vm.pmap.pde.p_failures: 21525
@@ -1202 +1216 @@ vm.pmap.pde.mappings: 0
-vm.pmap.pde.demotions: 60
+vm.pmap.pde.demotions: 223
@@ -1208 +1222 @@ vfs.ufs.dirhash_docheck: 0
-vfs.ufs.dirhash_mem: 55412
+vfs.ufs.dirhash_mem: 58917
@@ -1266 +1280 @@ vfs.getnewbufrestarts: 0
-vfs.getnewbufcalls: 1437
+vfs.getnewbufcalls: 1585
@@ -1269 +1283 @@ vfs.lofreebuffers: 1122
-vfs.numfreebuffers: 20093
+vfs.numfreebuffers: 20091
@@ -1273 +1287 @@ vfs.lodirtybuffers: 2524
-vfs.numdirtybuffers: 25
+vfs.numdirtybuffers: 27
@@ -1282 +1296 @@ vfs.buffreekvacnt: 0
-vfs.bufreusecnt: 1436
+vfs.bufreusecnt: 1557
@@ -1286 +1300 @@ vfs.maxmallocbufspace: 16447897
-vfs.bufmallocspace: 0
+vfs.bufmallocspace: 2048
@@ -1288 +1302 @@ vfs.maxbufspace: 329613312
-vfs.bufspace: 23527424
+vfs.bufspace: 25509888
@@ -1291 +1305 @@ vfs.vmiodirenable: 1
-vfs.cache.numfullpathfound: 2
+vfs.cache.numfullpathfound: 48
@@ -1295 +1309 @@ vfs.cache.numfullpathfail1: 0
-vfs.cache.numfullpathcalls: 2
+vfs.cache.numfullpathcalls: 48
@@ -1297,12 +1311,12 @@ vfs.cache.numupgrades: 0
-vfs.cache.numneghits: 57
-vfs.cache.numnegzaps: 0
-vfs.cache.numposhits: 995
-vfs.cache.numposzaps: 1
-vfs.cache.nummisszap: 0
-vfs.cache.nummiss: 293
-vfs.cache.numchecks: 1053
-vfs.cache.dotdothits: 0
-vfs.cache.dothits: 1
-vfs.cache.numcalls: 1347
-vfs.cache.numcache: 228
-vfs.cache.numneg: 14
+vfs.cache.numneghits: 267
+vfs.cache.numnegzaps: 11
+vfs.cache.numposhits: 4967
+vfs.cache.numposzaps: 31
+vfs.cache.nummisszap: 26
+vfs.cache.nummiss: 558
+vfs.cache.numchecks: 5276
+vfs.cache.dotdothits: 9
+vfs.cache.dothits: 41
+vfs.cache.numcalls: 5910
+vfs.cache.numcache: 279
+vfs.cache.numneg: 17
@@ -1316 +1330 @@ vfs.usermount: 0
-vfs.worklist_len: 12
+vfs.worklist_len: 13
@@ -1318 +1332 @@ vfs.timestamp_precision: 0
-vfs.reassignbufcalls: 25
+vfs.reassignbufcalls: 285
@@ -1320 +1334 @@ vfs.vlru_allow_cache_src: 0
-vfs.freevnodes: 4
+vfs.freevnodes: 14
@@ -1322 +1336 @@ vfs.wantfreevnodes: 31771
-vfs.numvnodes: 233
+vfs.numvnodes: 295
@@ -1397 +1411 @@ debug.sx.retries: 10
-debug.to_avg_mpcalls: 833
+debug.to_avg_mpcalls: 1236
@@ -1399,2 +1413,2 @@ debug.to_avg_lockcalls: 0
-debug.to_avg_gcalls: 488
-debug.to_avg_depth: 1533
+debug.to_avg_gcalls: 727
+debug.to_avg_depth: 2020
@@ -1416,3 +1430,3 @@ debug.vfscache: 1
-debug.numcachehv: 20
-debug.numcache: 228
-debug.numneg: 14
+debug.numcachehv: 28
+debug.numcache: 279
+debug.numneg: 17
@@ -1422 +1436 @@ debug.rush_requests: 0
-debug.vn_io_faults: 0
+debug.vn_io_faults: 3
@@ -1444,3 +1458,3 @@ debug.softdep.jaddref_rollback: 0
-debug.softdep.dir_entry: 0
-debug.softdep.direct_blk_ptrs: 0
-debug.softdep.inode_bitmap: 0
+debug.softdep.dir_entry: 6
+debug.softdep.direct_blk_ptrs: 1
+debug.softdep.inode_bitmap: 6
@@ -1475 +1489 @@ debug.softdep.write.freefile: 0
-debug.softdep.write.freeblks: 0
+debug.softdep.write.freeblks: 7
@@ -1479 +1493 @@ debug.softdep.write.indirdep: 0
-debug.softdep.write.allocdirect: 0
+debug.softdep.write.allocdirect: 42
@@ -1481,3 +1495,3 @@ debug.softdep.write.newblk: 0
-debug.softdep.write.bmsafemap: 0
-debug.softdep.write.inodedep: 0
-debug.softdep.write.pagedep: 0
+debug.softdep.write.bmsafemap: 17
+debug.softdep.write.inodedep: 91
+debug.softdep.write.pagedep: 16
@@ -1500 +1514 @@ debug.softdep.current.mkdir: 0
-debug.softdep.current.diradd: 9
+debug.softdep.current.diradd: 10
@@ -1509,2 +1523,2 @@ debug.softdep.current.bmsafemap: 2
-debug.softdep.current.inodedep: 10
-debug.softdep.current.pagedep: 2
+debug.softdep.current.inodedep: 11
+debug.softdep.current.pagedep: 3
@@ -1523,8 +1537,8 @@ debug.softdep.total.freedep: 0
-debug.softdep.total.freework: 0
-debug.softdep.total.newdirblk: 0
-debug.softdep.total.dirrem: 1
-debug.softdep.total.mkdir: 0
-debug.softdep.total.diradd: 10
-debug.softdep.total.freefile: 1
-debug.softdep.total.freeblks: 0
-debug.softdep.total.freefrag: 27
+debug.softdep.total.freework: 8
+debug.softdep.total.newdirblk: 1
+debug.softdep.total.dirrem: 35
+debug.softdep.total.mkdir: 2
+debug.softdep.total.diradd: 59
+debug.softdep.total.freefile: 16
+debug.softdep.total.freeblks: 7
+debug.softdep.total.freefrag: 83
@@ -1534,4 +1548,4 @@ debug.softdep.total.allocdirect: 0
-debug.softdep.total.newblk: 97
-debug.softdep.total.bmsafemap: 10
-debug.softdep.total.inodedep: 11
-debug.softdep.total.pagedep: 2
+debug.softdep.total.newblk: 305
+debug.softdep.total.bmsafemap: 48
+debug.softdep.total.inodedep: 68
+debug.softdep.total.pagedep: 13
@@ -1569 +1583 @@ dev.cpu.0.cx_lowest: C1
-dev.cpu.0.cx_usage: 100.00% last 679us
+dev.cpu.0.cx_usage: 100.00% last 785us
@@ -1577 +1591 @@ dev.cpu.1.cx_lowest: C1
-dev.cpu.1.cx_usage: 100.00% last 801us
+dev.cpu.1.cx_usage: 100.00% last 89us



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120906182116.GD13179>