0% found this document useful (0 votes)
8 views4 pages

Solaris Day7

Uploaded by

suresh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views4 pages

Solaris Day7

Uploaded by

suresh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Solaris Administration training series – Day 6

System Performance Tuning in Solaris

Performance tuning ensures the efficient utilization of system resources, minimizes bottlenecks, and
optimizes workload handling. This involves monitoring, diagnosing, and adjusting various system
parameters to achieve optimal performance.

1. System Load and Tuning Parameters

Monitoring System Load

1. uptime Command:

o Displays system uptime and load averages:

uptime

▪ Load averages represent the number of active processes over 1, 5, and 15


minutes.

2. vmstat:

o Provides statistics on CPU, memory, and I/O usage:

vmstat 5

Key columns:

▪ r: Number of processes waiting for CPU.

▪ b: Number of blocked processes.

▪ us: CPU usage by user processes.

▪ sy: CPU usage by system processes.

▪ id: Idle CPU percentage.

3. prstat:

o Real-time process monitoring with resource usage:

prstat -c

▪ Focus on processes with high CPU and memory consumption.

Tuning Parameters

1. Kernel Parameters:

o Modify using the /etc/system file for persistent changes.

o Example: Adjust maximum file descriptors:

set rlim_fd_cur = 8192

2. Dynamic Reconfiguration:

o Use ndd for network tuning.

1
o Example: Increase TCP connection backlog:

ndd -set /dev/tcp tcp_conn_req_max_q 2048

2. Troubleshooting System Performance

Identifying Bottlenecks

1. CPU Bottlenecks:

o Use mpstat to monitor CPU usage:

mpstat 5

▪ High user or system CPU indicates heavy processing load.

2. Memory Bottlenecks:

o Use vmstat to check memory usage and swapping.

o Frequent swapping (so and si columns) indicates insufficient memory.

3. Disk I/O Bottlenecks:

o Use iostat to analyze disk activity:

iostat -xn 5

▪ Focus on high service times (svc_t) or low utilization (%b).

4. Network Bottlenecks:

o Use netstat to monitor network connections:

netstat -i

▪ Check for high collision rates or dropped packets.

Analyzing System Logs

• Review logs in /var/adm/messages for errors or warnings.

tail -f /var/adm/messages

3. Memory Management and Swap Tuning

Memory Management

1. View Memory Usage:

o Use prtconf to check total physical memory:

prtconf | grep Memory

2. Adjust Kernel Memory Parameters:

o Modify parameters like maxpgio and minfree in /etc/system for memory tuning.

o Example:

set maxpgio = 256

2
set minfree = 1024

Swap Management

1. View Swap Usage:

o Use swap to list and monitor swap areas:

swap -s # Summary
swap -l # Detailed swap partition info
2. Add Swap Space:

o Create a swap file:

mkfile 1g /swapfile

o Enable the swap file:

swap -a /swapfile

o Verify:

swap -l

3. Optimize Swap Usage:

o Ensure sufficient swap space (typically 1.5x to 2x physical RAM).

o Monitor swap activity with vmstat.

4. Optimizing Disk I/O Performance

Analyzing Disk I/O

1. iostat Command:

o Monitor disk performance:

iostat -xn 5

Key metrics:

▪ svc_t: Service time (should be low).

▪ %b: Disk busy percentage.

2. dtrace:

o Analyze specific disk activity:

dtrace -n 'syscall::write:entry { @writes[execname] = count(); }'

Tuning Disk I/O

1. File System Optimization:

o Use ZFS for improved I/O performance.

o Enable compression to reduce disk usage:

zfs set compression=on poolname/dataset

3
2. RAID Configurations:

o Use RAID-1 (mirroring) or RAID-10 for read/write-intensive applications.

o RAID configurations can be managed using Solaris Volume Manager (SVM).

3. Increase I/O Buffering:

o Adjust maxphys parameter to increase I/O transfer size.

set maxphys = 1048576

4. Disk Scheduling:

o Optimize I/O scheduling policies for specific workloads using ZFS or SVM.

Practical Use Case: Spice Jet Airline Reservation System

Scenario

An airline reservation system faces performance degradation during peak hours. Users report slow
response times for booking transactions.

Solution

1. Monitor System Load:

o Use prstat and vmstat to identify high CPU and memory usage by booking processes.

2. Optimize Memory and Swap:

o Add a swap file to handle peak-hour memory demands:

mkfile 2g /swapfile

swap -a /swapfile

3. Enhance Disk I/O Performance:

o Enable ZFS compression to improve storage efficiency:

zfs set compression=on airline_pool/reservations

4. Address CPU Bottlenecks:

o Bind high-priority booking processes to specific CPUs:

pbind -b 1 <PID>

5. Proactive Monitoring:

o Set up dtrace scripts to detect unusual spikes in I/O or CPU usage.

Conclusion

System performance tuning in Solaris involves continuous monitoring and adjustments. By optimizing
parameters like CPU, memory, and disk I/O, and leveraging tools like prstat, vmstat, and dtrace,
administrators can ensure high availability and responsiveness of critical systems like airline
reservation platforms.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy