UnixBenchを仮想化環境で使ってみたときに、ふと、以前TOMOYO Linuxに対してUnixBenchをとった結果を思い出した。
今年7月頃にとっておいたもので、カーネル2.6.26 + TOMOYO Linux 1.6.8を、OpenBlockS266とOpenMicroServerで計測。
やっていることは、
- ファイルとネットワーク関連のアクセスコントロールを有効にしたもの
- 全てのアクセスコントロールを有効にしたもの
をTOMOYO Linuxを組み込んでいない素のカーネルと比較してます。一部計測できなかったものもあったので、計測できたものだけ載せます。
また、見にくいので、素のカーネルに対する比のみ。要望があれば値も出します。
OpenBlockS266
テスト項目 |
file+net |
all |
Dhrystone 2 using register variables |
99.99% |
99.98% |
Double-Precision Whetstone |
100.00% |
100.00% |
System Call Overhead |
92.68% |
92.73% |
Pipe Throughput |
86.75% |
88.92% |
Pipe-based Context Switching |
76.68% |
80.92% |
Process Creation |
98.25% |
98.79% |
Execl Throughput |
85.48% |
77.11% |
File Read 1024 bufsize 2000 maxblocks |
88.07% |
88.05% |
File Write 1024 bufsize 2000 maxblocks |
99.53% |
98.55% |
File Copy 1024 bufsize 2000 maxblocks |
89.03% |
88.85% |
File Read 256 bufsize 500 maxblocks |
81.59% |
82.16% |
File Write 256 bufsize 500 maxblocks |
97.83% |
98.71% |
File Copy 256 bufsize 500 maxblocks |
83.61% |
84.69% |
File Read 4096 bufsize 8000 maxblocks |
95.03% |
93.73% |
File Write 4096 bufsize 8000 maxblocks |
100.39% |
93.02% |
File Copy 4096 bufsize 8000 maxblocks |
91.08% |
88.42% |
Arithmetic Test (type = short) |
99.96% |
99.95% |
Arithmetic Test (type = int) |
99.96% |
99.95% |
Arithmetic Test (type = long) |
99.96% |
99.95% |
Arithmetic Test (type = float) |
100.28% |
100.54% |
Arithmetic Test (type = double) |
99.81% |
99.80% |
Arithoh |
99.96% |
99.95% |
Dc: sqrt(2) to 99 decimal places |
98.22% |
98.02% |
Recursion Test--Tower of Hanoi |
99.97% |
99.96% |
メモリ |
素のLinux |
file+net |
all |
Mem: total (注) (kB) |
63,052 |
62,968 |
62,968 |
Mem: used (kB) |
12,220 |
12,976 |
13,048 |
Mem: free (kB) |
50,832 |
49,992 |
49,920 |
Mem: buffers (kB) |
128 |
132 |
132 |
注) rootfsイメージをメモリ(64MB)上に展開しているので、TOMOYO Linuxを使うとメモリトータルは少し小さくなります。
ポリシファイル |
file+net |
all |
domain_policy.conf: size |
32,120 |
75,614 |
domain_policy.conf: line |
986 |
3,108 |
exception_policy.conf: size |
10,163 |
10,163 |
exception_policy.conf: line |
292 |
292 |
system_policy.conf: size |
0 |
212 |
system_policy.conf: line |
0 |
6 |
/proc/ccs/meminfo |
file+net |
all |
|
Shared: |
20,480 |
20,480 |
Private: |
24,576 |
53,248 |
Dynamic: |
608 |
608 |
Total: |
45,664 |
74,336 |
OpenMicroServer
テスト項目 |
file+net |
all |
Dhrystone 2 using register variables |
100.26% |
100.26% |
Double-Precision Whetstone |
107.93% |
107.93% |
System Call Overhead |
99.57% |
99.57% |
Pipe Throughput |
68.40% |
68.51% |
Pipe-based Context Switching |
79.30% |
77.61% |
Process Creation |
105.53% |
105.54% |
Execl Throughput |
91.59% |
84.79% |
File Read 1024 bufsize 2000 maxblocks |
100.22% |
101.29% |
File Write 1024 bufsize 2000 maxblocks |
126.51% |
126.20% |
File Copy 1024 bufsize 2000 maxblocks |
108.30% |
109.82% |
File Read 256 bufsize 500 maxblocks |
104.69% |
104.89% |
File Write 256 bufsize 500 maxblocks |
134.45% |
134.47% |
File Copy 256 bufsize 500 maxblocks |
112.93% |
112.93% |
File Read 4096 bufsize 8000 maxblocks |
101.37% |
103.19% |
File Write 4096 bufsize 8000 maxblocks |
114.92% |
115.01% |
File Copy 4096 bufsize 8000 maxblocks |
106.33% |
108.59% |
Arithmetic Test (type = short) |
100.21% |
100.21% |
Arithmetic Test (type = int) |
100.21% |
100.21% |
Arithmetic Test (type = long) |
100.20% |
100.21% |
Arithmetic Test (type = float) |
99.64% |
99.64% |
Arithmetic Test (type = double) |
99.80% |
99.81% |
Arithoh |
100.20% |
100.21% |
Dc: sqrt(2) to 99 decimal places |
103.16% |
102.98% |
Recursion Test--Tower of Hanoi |
100.14% |
100.14% |
メモリ |
素のLinux |
file+net |
all |
Mem: total (kB) |
126,636 |
126,544 |
126,544 |
Mem: used (kB) |
13,928 |
14,764 |
14,820 |
Mem: free (kB) |
112,708 |
111,780 |
111,724 |
Mem: buffers (kB) |
120 |
120 |
120 |
ポリシファイル |
file+net |
all |
domain_policy.conf: size |
32,120 |
74,502 |
domain_policy.conf: line |
986 |
3,108 |
exception_policy.conf: size |
10,245 |
10,245 |
exception_policy.conf: line |
294 |
294 |
system_policy.conf: size |
0 |
212 |
system_policy.conf: line |
0 |
6 |
/proc/ccs/meminfo |
file+net |
all |
|
Shared: |
20,480 |
20,480 |
Private: |
24,576 |
53,248 |
Dynamic: |
640 |
640 |
Total: |
45,696 |
74,368 |
結果
一部、素のカーネルよりも高速になると結果が出てしまっているもの(特にOpenMicroServerのファイル関連)ものはありますが、
この結果以外の他の組込み機器の結果も含めてみると、
- TOMOYO Linuxを使うことにより、Pipe Throughput、Pipe-based Context Switching、Execl Throughputのパフォーマンスが落ちる。
- 特に、Execl Throughputは、ポリシーサイズが大きくなるにつれ、パフォーマンス低下が大きくなる。
という傾向になりました。