1 .\" Copyright (c) 2001 Andreas Dilger (adilger@turbolinux.com)
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" Japanese Version Copyright (c) 2001 NAKANO Takeo all rights reserved.
24 .\" Translated Thu Aug 16 2001 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
26 .TH SLABINFO 5 2007-09-30 "" "Linux Programmer's Manual"
28 /proc/slabinfo \- カーネル slab アロケータの統計
32 Linux カーネルの内部で良く利用されるオブジェクト
33 (バッファヘッド、i-ノード、ディレクトリ・エントリなど)
34 は、それぞれ自分用のキャッシュを備えている。ファイル
41 slabinfo \- version: 1.1
42 kmem_cache 60 78 100 2 2 1
43 blkdev_requests 5120 5120 96 128 128 1
44 mnt_cache 20 40 96 1 1 1
45 inode_cache 7005 14792 480 1598 1849 1
46 dentry_cache 5469 5880 128 183 196 1
47 filp 726 760 96 19 19 1
48 buffer_head 67131 71240 96 1776 1781 1
49 vm_area_struct 1204 1652 64 23 28 1
51 size-8192 1 17 8192 1 17 2
52 size-4096 41 73 4096 41 73 1
57 それぞれの slab キャッシュごとに、キャッシュの名前、
58 現在アクティブなオブジェクトの数、利用可能なオブジェクトの総数、
59 各オブジェクトのサイズ (バイト単位)、少なくとも一つのアクティブな
60 オブジェクトを有するページの数、アロケートされたページの総数、
61 slab あたりのページ数、が与えられている。
64 オブジェクトのアラインメントと slab キャッシュのオーバーヘッドとにより、
65 オブジェクトは通常ページの内部にきっちりとは収められていない。
66 利用中のオブジェクトをひとつでも保持しているページは、
69 slab キャッシュ統計の機能を有効にしてコンパイルされたカーネルでは、
70 出力の最初の行に "(statistics)" と表示され、 5 つのカラムが追加される。
71 それぞれ、アクティブなオブジェクトの瞬間最大値、
72 .\"nakano でいいのかなあ > high water mark
75 (新しいページがこのキャッシュに追加された) 回数、
77 (使っていないページがこのキャッシュから削除された) 回数、
78 新たなページをこのキャッシュにアロケートする際に起きたエラーの回数、である。
79 slab キャッシュ統計が使えないカーネルでは、これらのカラムは表示されない。
81 SMP システムでは、出力の最初の行に "(SMP)" と表示され、
82 各 slab ごとに 2 つのカラムが追加される。
83 これらは各 CPU が持つローカルなキャッシュ (per-CPU キャッシュ) の
86 オブジェクトをキャッシュからアロケートする際に
87 CPU 間での同期を減少させるために設けられている)。
89 すなわち各 CPU ごとにキャッシュできるオブジェクトの最大数である。
91 すなわち per-CPU キャッシュが空だったり一杯だったりした場合に、
92 グローバルなキャッシュと受け渡しできるフリーなオブジェクトの最大数である。
94 slab キャッシュ統計と SMP が両方有効になっている場合は、
95 per-CPU キャッシュの統計を表示する 4 つのカラムがさらに追加される。
96 最初の 2 つは per-CPU キャッシュの
97 アロケーションヒットカウントとアロケーションミスカウントである。
98 すなわち、あるオブジェクトをアロケートしたときに、
99 それが per-CPU キャッシュの内部に あった/なかった 回数である。
100 続く 2 つは、per-CPU キャッシュのフリーヒットカウントとミスカウントである。
101 すなわち解放されたオブジェクトをグローバルなキャッシュにフラッシュする前に、
102 per-CPU キャッシュの制限の範囲に 収まった/収まらなかった 回数である。
104 SMP において per-CPU slab キャッシュの制限値や
105 バッチカウントを変更するには、以下のようにすればよい:
109 echo "\fIcache_name limit batchcount\fP" > /proc/slabinfo
116 は Linux 2.1.23 以降に存在する。
117 SMP における CPU ごとのキャッシュは Linux 2.4.0-test3 以降に存在する。