Linux+DB2のパフォーマンスチューニング 2

Linuxから参照されているハードウェアの情報

Linuxから参照されているハードウェアの情報

   第1回で解説したように何か問題が起こっている場合のチューニングの際は、ハードウェアも考慮にいれて対処することで、思っていた以上に早く問題が解決する場合があります。

   例えばマルチCPUで動作していると思っていたのが、実はシングルCPUで動作していたためにパフォーマンスがでていなかったなどの非常に単純な問題も避けることができます。

   Linuxが認識しているハードウェアの情報を知るためには、Linuxのブート情報、PCIデバイスとしてLinuxが認識している機器の情報を取得しておきます。

Linuxのブート情報

   Linuxのブート情報はシステムのブート直後に「/var/log/dmesg」としてテキストファイルで存在しますが、以下のようにdmesgコマンドを発行して動的に取得するようにします。

Linuxのブート情報を取得

[root@host1 ~]# dmesg
1024K
using mwait in idle threads.
CPU: Hyper-Threading is disabled
ACPI: System reset via FADT Reset Register is supported
Using IO APIC NMI watchdog
CPU: Trace cache: 12K uops , L1 D cache: 16K
CPU: L2 cache: 1024K
CPU: Hyper-Threading is disabled
CPU0:           Intel(R) Xeon(TM) CPU 3.20GHz stepping 04
per - CPU timeslice cutoff: 1024.00 usecs.
task migration cache decay timeout: 2 msecs.
Booting processor 1/6 rip 6000 rsp 1003ff55f58
Initializing CPU#1
Calibrating delay loop... 6389.76 BogoMIPS (lpj =3194880)
CPU: Trace cache: 12K uops , L1 D cache: 16K
CPU: L2 cache: 1024K
CPU: Hyper-Threading is disabled
Intel(R) Xeon(TM) CPU 3.20GHz stepping 01
Total of 2 processors activated (12697.60 BogoMIPS).
以下省略

 

PCIデバイス情報の取得

   PCIおよびPCIに接続されたデバイスの情報を取得します。一覧を単純に取得するには以下のような「lspci」コマンドを発行して情報を取得します。

PCIデバイス情報を取得

[root@ host1 ~]# lspci
00:00.0 Host bridge: Intel Corporation E7520 Memory Controller H ub (rev 0c)
00:00.1 Class ff00: Intel Corporation E7525/E7520 Error Reportin g Registers (rev 0c)
00:03.0 PCI bridge: Intel Corporation E7525/E7520/E7320 PCI Expr ess Port A1 (rev 0c)
00:08.0 System peripheral: Intel Corporation E7525/E7520/E7320 E xtended Configuration Registers (rev 0c)
00:1c.0 PCI bridge: Intel Corporation 6300ESB 64 - bit PCI - X Bridge (rev 02)
00:1d.0 USB Controller: Intel Corporation 6300ESB USB Universal Host Controller (rev 02)
00:1d.1 USB Controller: Intel Corporation 6300ESB USB Universal Host Controller (rev 02)
00:1d.4 System peripheral: Intel Corporation 6300ESB Watchdog Ti mer (rev 02)
00:1d.5 PIC: Intel Corporation 6300ESB I/O Advanced Programmable Interrupt Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 0a)


   これらの項目については簡単なシェルスクリプトなどを導入直後に作成しておくと便利です。

次回は

   次回からは第1回の連載で解説したLinuxのパフォーマンス評価基準にしたがって実際のパフォーマンスデータをコマンドを使用して取得していきま す。それによってチューニングする際の基準データと基準となる設定がそろうことになりますが、これらのデータが基礎となってパフォーマンス上の問題に対処 することができるようになります。

この記事をシェアしてください

人気記事トップ10

人気記事ランキングをもっと見る