hp education services education.hp.com 67 CPU Management Version B.02 H4262S Module 5 Slides
© 2001 Hewlett-Packard Company H4262S B Processor Module CPU TLBCache Coprocessor System Bus
© 2001 Hewlett-Packard Company H4262S B Symmetric Multiprocessing CPU TLBCache Coprocessor CPU TLBCache Coprocessor System Bus
© 2001 Hewlett-Packard Company H4262S B CPU Processor CPU TLBCache Coprocessor Shadow Registers Space Registers General Registers Control Registers Process Status Word Instruction Address Queues Special Function Unit Registers Coprocessor Registers
© 2001 Hewlett-Packard Company H4262S B CPU Cache CPU TLBCacheCoprocessor System Bus Memory Process Text xxxx Instruction to Execute xxxx
© 2001 Hewlett-Packard Company H4262S B TLB Cache CPU TLBCacheCoprocessor System Bus Memory Process Text xxxx Instruction to Execute xxxx VA | PA 0. 4GB Instruction Address Queues VA\PA
© 2001 Hewlett-Packard Company H4262S B TLB, Cache, and Memory TLB Hit Miss Cache Hit Miss X Memory Hit Miss Consequence 1 CPU cycle fetch Data/instruction memory fetch PDIR memory fetch Page fault X = Don’t Care
© 2001 Hewlett-Packard Company H4262S B HP-UX — Performance Optimized Page Sizes (POPS) Filesystem File Filesystem File Memory TLB (on CPU) VA PA VA PA VA VA HP-UX 10.x Fixed Page Size – 4 KB HP-UX Variable Page Size Range: 4 KB – 64 MB
© 2001 Hewlett-Packard Company H4262S B CPU — Metrics to Monitor Systemwide User CPU utilization System CPU utilization Idle CPU utilization Nice utilization System call rate Context switch rate Real time processes CPU run queues (load averages)
© 2001 Hewlett-Packard Company H4262S B CPU — Metrics to Monitor per Process Process priority Process nice value Amount of CPU user time Amount of CPU system time
© 2001 Hewlett-Packard Company H4262S B Activities that Utilize the CPU Process management File system I/O Memory management activities System calls Applications (for example, CAD-CAM and database processes) Batch jobs
© 2001 Hewlett-Packard Company H4262S B glance — CPU Report B3692A GlancePlus B :00:42 e2403roc 9000/856 Current Avg High CPU Util S SU U | 25% 20% 47% Disk Util F FV | 12% 6% 23% Mem Util S SU UB B | 85% 83% 85% Swap Util U UR R | 18% 18% 18% CPU REPORT Users= 4 State Current Average High Time Cum Time User Nice Negative Nice RealTime System Interrupt ContextSwitch Traps Vfaults Idle Load Average Top CPU user: PID 2097, dthelpview 19.5% cpu util
© 2001 Hewlett-Packard Company H4262S B glance — CPU by Processor B3692A GlancePlus B :13:18 e2403roc 9000/856 Current Avg High CPU Util S SU U | 25% 20% 47% Disk Util F FV | 12% 6% 23% Mem Util S SU UB B | 85% 83% 85% Swap Util U UR R | 18% 18% 18% CPU BY PROCESSOR Users= 4 CPU Util LoadAvg(1/5/15 min) CSwitch Last Pid / 0.4/ Page 1 of 2
© 2001 Hewlett-Packard Company H4262S B glance — Individual Process B3692A GlancePlus B :17:52 e2403roc 9000/856 Current Avg High CPU Util S SN NU | 22% 29% 51% Disk Util F | 1% 7% 13% Mem Util S SU UB B | 91% 91% 91% Swap Util U UR R | 25% 24% 35% Resource Usage for PID: 16013, netscape PPID: euid: 520 User:sohrab CPU Usage (sec) : 3.38 Log Reads : 166 Rem Log Rds/Wts: 0/ 0 User/Nice/RT CPU: 2.43 Log Writes: 75 Rem Phy Rds/Wts: 0/ 0 System CPU : 0.73 Phy Reads : 4 Interrupt CPU : 0.14 Phy Writes: 61 Total RSS/VSS : 22.4mb/ 28.3mb Cont Switch CPU : 0.08 FS Reads : 4 Traps / Vfaults: 414/ 8 Scheduler : HPUX FS Writes : 29 Faults Mem/Disk: 0/ 0 Priority : 154 VM Reads : 0 Deactivations : 0 Nice Value : 24 VM Writes : 0 Forks & Vforks : 0 Dispatches : 1307 Sys Reads : 0 Signals Recd : 339 Forced CSwitch : 460 Sys Writes: 32 Mesg Sent/Recd : 775/ 1358 VoluntaryCSwitch: 814 Raw Reads : 0 Other Log Rd/Wt: 3924/ 957 Running CPU : 0 Raw Writes: 0 Other Phy Rd/Wt: 0/ 0 CPU Switches : 0 Bytes Xfer: 410kb Proc Start Time Wait Reason : SLEEP Fri Feb 6 15:14:
© 2001 Hewlett-Packard Company H4262S B glance — Global System Calls B3692A GlancePlus B :17:52 e2403roc 9000/856 Current Avg High CPU Util S SU U | 25% 20% 47% Disk Util F FV | 12% 6% 23% Mem Util S SU UB B | 85% 83% 85% Swap Util U UR R | 18% 18% 18% GLOBAL SYSTEM CALLS Users= 4 System Call Name ID Count Rate CPU Time Cum Ct CumRate Cum CPU syscall fork read write open close wait time chmod ioctl poll Cumulative Interval: 87 secs Page 1 of 7
© 2001 Hewlett-Packard Company H4262S B glance — System Calls by Process B3692A GlancePlus B :39:20 e2403roc 9000/856 Current Avg High CPU Util S SN NU | 22% 29% 51% Disk Util F | 1% 7% 13% Mem Util S SU UB B | 91% 91% 91% Swap Util U UR R | 25% 24% 35% System Calls for PID: 1822, netscape PPID: 1775 euid: 503 User:roc Elapsed Elapsed System Call Name ID Count Rate Time Cum Ct CumRate CumTime read write open close time brk lseek stat ioctl utssys Cumulative Interval: 15 secs Page 1 of 3
© 2001 Hewlett-Packard Company H4262S B timex Command $ timex prime_med real25.65 user20.71 sys 3.43
© 2001 Hewlett-Packard Company H4262S B Tuning a CPU-Bound System — Hardware Solutions Upgrade to a faster processor Upgrade the system with a larger data/instruction cache Add a processor to a multiprocessor system Spread applications to multiple systems
© 2001 Hewlett-Packard Company H4262S B Tuning a CPU-Bound System — Software Solutions Nice less important processes Anti-nice important processes Consider using rtprio or rtsched on important processes Run batch jobs during non-peak hours Consider using PRM or WLM Consider using the processor affinity call mpctl() Optimize/recompile application
© 2001 Hewlett-Packard Company H4262S B CPU TLBCache Coprocessor CPU TLBCache Coprocessor System Bus Memory Process mpctl (proc2) Processor 1 Processor 2 Is each processor pulling its weight? The sar -uqM command string can help you monitor the CPU loading on the individual processors in a MP system. CPU Utilization and MP Systems
© 2001 Hewlett-Packard Company H4262S B Processor Affinity CPU TLBCache Coprocessor CPU TLBCache Coprocessor System Bus Memory Process mpctl (proc2) Processor 1 Processor 2 The mpctl() system call assigns the calling process to a specific processor.