2008년 7월 10일 목요일

Solaris Performance Tunning - Overview

▶ Solaris Performance Tunning - Overview

1. 이상적인 시스템(Ideal System)의 요건

>> High but not full CPU utilization (70~90%)
>> CPU Time spent in user application (85+% in user)
>> Low Disk utilization (5~15% for each disk)
>> Low Network utilization (10~30% per network, less 5% of collision)

 2. 튜닝의 일반적인 모델

Agree level of Performance to reach -> Gather Data using monitoring tool(vmstat, iostat, netstat,...) -> Analyze Data -> Work from the biggest bottleneck first

주의: 시스템의 성능(Performance)은 시스템의 리소스를 어떻게 사용하느냐에 좌우된다.

 3. 튜닝의 일반적인 순서

1st. Application Tuning
2nd. DataBase Tuning
3rd. OS Tuning(System Tuning)

 4. 실행가능한 몇가지 모니터링 툴

- vmstat : command to view status of memory and CPU
- ps : command to find which process are hogs
- swap : command for available swap space
- iostat : command for terminal, disk, cpu utilization
- netstat, nfsstat : command for network performance
- sar : command to view system activity (need SUNWaccr, SUNWaccu packages)
- mpstat : command to view status of multi-cpu
- truss : command to trace system calls what is going on
- cachefs : mechanism to speed up read-mostly NFS
- PrestoServe : application for synchronous writes (many small files, Mail server)
- DiskPak of Eagle company : application for fragmented disks

 5. 힌트 : 데이터베이스 관리시스템 튜닝

- Configure disk for speed, Not capacity
- I/O load needs many random access disks
- 3*1.05GB is over twice as fast as 1*2.9GB
- Use raw disk for tablespaces to reduce CPU load
- Save inode and indirect block updates
- Use dd | compress into filesystem for snap backup then ufsdump normally
- Use UFS for tablespaces to reduce I/O load
- Extra level of caching needs more RAM
- With UFS, use PrestoServe/NVSIMM or Logging option
- Use large shared memory area (up to 25% of RAM)
- If uo value is upper 25%, must expand shared memory

 6. 시스템 성능을 좌우하는 요소들

- CPU : number of CPUs
- I/O Devices : disk, printer, terminal, transfer information
- Memory : primary memory(RAM), secondary memory(on disk)
- Kernel : kernel parameters (/etc/system)
- Network

주의 : 튜닝시 반드시 시스템과 네트웍을 같이 고려해야 한다.

 8. 첫 번째 시스템 튜닝 10 단계

1st. The system will usually have a disk bottleneck.
2nd. You will be told that the system is NOT I/O bound.
3rd. After first pass tuning the system will still have a disk bottleneck.
4th. Poor NFS response times are hard to pin down.
5th. Avoid the common memory usage misconceptions.
6th. Don't panic when you seee page-ins and page-outs in vmstat.
7th. Look for page scanner activity.
8th. Look for a long run queue (vmstat procs r).
9th. Look for processes blocked waiting for I/O (vmstat proc b).
10th. Look for CPU system time dominating user time.

 9. 첫 번째 튜닝 접근

1st. Clear up any RAM shortage.
     => If at first the monitoring indicates paging, Add more RAM.
2nd. Make sure that processor speed, or number of process.
     => Clear out unnecessary processes.
     => Make sure that the run queue is as small as possible.
3rd. Focus I/O subsystems (disk, networks)
4th. Use "iostat -x" to monitor the disk.
     => Check busy(%b) and service time(svc_t)
5th. Continue to cycle around the tuning path until all subsytems, and indeed the machine itself is fast enough to reach the required perfomance metric.

댓글 없음:

댓글 쓰기