linuxperformance
Linux - Performance
Howto: determine LVM device in iostat output
ls -l /dev/mapper/*
the device minor number corresponds to the dm-N number
Memory
Because the kernel does file caching the 'free' for 'buffers/cache' is actually what is available for use.
$ free -m
total used free shared buffers cached
Mem: 4096 3757 338 0 869 1814
-/+ buffers/cache: 1074 3021
Swap: 4095 0 4095
Never look at the ouput from a single vmstat, those are averages over time and do not reflect current values.
$ vmstat 1 3
sar
| Memory: | $ sar -r |
| Swap: | $ sar -W |
| Paging: | $ sar -B |
| Queue length and load average: | $ sar -q |
| CPU utilization: | $ sar -u |
| Per-processor: | $ sar -P {cpu_num}
or $ sar -P ALL |
| Context switching: | $ sar -w |
| I/O rates: | $ sar -b |
| Per block device: | $ sar -dp |
| Network: | $ sar -n DEV |
| Historical data: | $ sar {options} -f /var/log/sa/sa{dd}
|
swappiness
View/adjust kernel tendency to swap (larger is greater tendency).
To view:
cat /proc/sys/vm/swappiness
Adjust on the fly:
echo {number} > /proc/sys/vm/swappiness
Adjust permanently:
- Change/set value for vm.swappiness in /etc/sysctl.conf
- Issue command sysctl -p
linuxperformance.txt · Last modified: 2017/11/10 00:51 by mark