Performance Tuning and Monitoring, Part 1

x86info

x86info is a very useful tool that can be used to display a range of information about the CPUs present in an x86 system. The following is the output on my system:

x86info v1.20.  Dave Jones 2001-2006
Feedback to <[email protected]>.

Found 2 CPUs
--------------------------------------------------------------------------
CPU #1
Family: 15 Model: 11 Stepping: 2
CPU Model : Athlon 64 CH7-CG
Processor name string: AMD Athlon(tm) 64 X2 Dual Core Processor 5000+

Feature flags:
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflsh mmx fxsr sse sse2 ht sse3 cmpxchg16b
Extended feature flags:
syscall nx mmxext Fast fxsave/fxrstor rdtscp lm 3dnowext 3dnow lahf/sahf CMP legacy svm ExtApicSpace LockMovCr0 3DNowPrefetch
The physical package has 2 cores
--------------------------------------------------------------------------
CPU #2
Family: 15 Model: 11 Stepping: 2
CPU Model : Athlon 64 CH7-CG
Processor name string: AMD Athlon(tm) 64 X2 Dual Core Processor 5000+
Feature flags:
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflsh mmx fxsr sse sse2 ht sse3 cmpxchg16b
Extended feature flags:
syscall nx mmxext Fast fxsave/fxrstor rdtscp lm 3dnowext 3dnow lahf/sahf CMP legacy svm ExtApicSpace LockMovCr0 3DNowPrefetch
The physical package has 2 cores
--------------------------------------------------------------------------
WARNING: Detected SMP, but unable to access cpuid driver.
Used Uniprocessor CPU routines. Results inaccurate.

This command is very useful in finding the L1/L2 cache of the CPU, which comes in very handy while configuring TLBs, etc. Just try running x86info -c to find the cache information of the CPU:

x86info v1.20.  Dave Jones 2001-2006
Feedback to <[email protected]>.

Found 2 CPUs
--------------------------------------------------------------------------
CPU #1
Family: 15 Model: 11 Stepping: 2
CPU Model : Athlon 64 CH7-CG
Processor name string: AMD Athlon(tm) 64 X2 Dual Core Processor 5000+

Feature flags:
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflsh mmx fxsr sse sse2 ht sse3 cmpxchg16b
Extended feature flags:
syscall nx mmxext Fast fxsave/fxrstor rdtscp lm 3dnowext 3dnow lahf/sahf CMP legacy svm ExtApicSpace LockMovCr0 3DNowPrefetch
Instruction TLB: Fully associative. 32 entries.
Data TLB: Fully associative. 32 entries.
L1 Data cache:
Size: 64Kb    2-way associative.
lines per tag=1    line size=64 bytes.
L1 Instruction cache:
Size: 64Kb    2-way associative.
lines per tag=1    line size=64 bytes.
L2 (on CPU) cache:
Size: 512Kb    8-way associative.
lines per tag=1    line size=64 bytes.

The physical package has 2 cores
--------------------------------------------------------------------------
CPU #2
Family: 15 Model: 11 Stepping: 2
CPU Model : Athlon 64 CH7-CG
Processor name string: AMD Athlon(tm) 64 X2 Dual Core Processor 5000+

Feature flags:
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflsh mmx fxsr sse sse2 ht sse3 cmpxchg16b
Extended feature flags:
syscall nx mmxext Fast fxsave/fxrstor rdtscp lm 3dnowext 3dnow lahf/sahf CMP legacy svm ExtApicSpace LockMovCr0 3DNowPrefetch
Instruction TLB: Fully associative. 32 entries.
Data TLB: Fully associative. 32 entries.
L1 Data cache:
Size: 64Kb    2-way associative.
lines per tag=1    line size=64 bytes.
L1 Instruction cache:
Size: 64Kb    2-way associative.
lines per tag=1    line size=64 bytes.
L2 (on CPU) cache:
Size: 512Kb    8-way associative.
lines per tag=1    line size=64 bytes.

The physical package has 2 cores
--------------------------------------------------------------------------
WARNING: Detected SMP, but unable to access cpuid driver.
Used Uniprocessor CPU routines. Results inaccurate.

You can see my CPU has an L1 (data cache) of 64 KB, an L1 (instruction cache) of 64 KB and an L2 cache of 512 KB. This information is very useful when tuning your CPU—which we’ll do in later sessions.

dumpe2fs

This tool displays very crucial filesystem information like volume, name, state, block size, etc. This information is very useful while tuning RAID and mounting external journals. These topics will be covered in detail in the upcoming sessions.

The following is the output of dumpe2fs /dev/sda1 which lists the details of my /dev/sda1 filesystem:

Filesystem volume name:       <none>
Last mounted on:              <not available>
Filesystem UUID:              515d8a09-85e4-45a7-bc77-3f7336234275
Filesystem magic number:      0xEF53
Filesystem revision #:        1 (dynamic)
Filesystem features:          has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super
Filesystem flags:                 signed_directory_hash
Default mount options:        user_xattr acl
Filesystem state:                 clean
Errors behavior:                  Continue
Filesystem OS type:           Linux
Inode count:                      51200
Block count:                      204800
Reserved block count:         10240
Free blocks:                      124082
Free inodes:                      51132
First block:                      1
Block size:                       1024
Fragment size:                    1024
Reserved GDT blocks:          256
Blocks per group:             8192
Fragments per group:          8192
Inodes per group:             2048
Inode blocks per group:       256
Filesystem created:           Sat Jul 25 11:46:19 2009
Last mount time:                  Tue Aug 18 11:28:43 2009
Last write time:                  Tue Aug 18 11:28:43 2009
Mount count:                      53
Maximum mount count:       -1
Last checked:                     Sat Jul 25 11:46:19 2009
Check interval:                   0 (<none>)
Reserved blocks uid:          0 (user root)
Reserved blocks gid:          0 (group root)
First inode:                      11
Inode size:                      128
Journal inode:                    8
Default directory hash:       half_md4
Directory Hash Seed:          82ccbbea-44f5-491f-b200-1370050b487f
Journal backup:                   inode blocks
Journal size:                     4113k
<<output truncated>>
  • Krishna

    Where is the Tuning part.This is only monitoring part.

  • senthil

    Where is the tuning part – please tell us how to tune following item

    1. Disk I/O Writes
    2. Tuning Network waittime/connection/max_number_of_connection
    3. CPU Tuning per process/maximum/minimum
    4. Tuning swap for process and etc

  • Dhammanand

    Topic Name Should be change to Monitoring , there no single of tunning related in this topic

  • http://www.fromdev.com Priya

    I agree with @Dhammanand, these are more statistics and monitoring but I guess are very important to start on tuning.

  • senthil

    yes Its very important please priya start writing the article abt tuning

All published articles are released under Creative Commons Attribution-NonCommercial 3.0 Unported License, unless otherwise noted.
Open Source For You is powered by WordPress, which gladly sits on top of a CentOS-based LEMP stack.

Creative Commons License.