Performance Tuning Overview
- 格式:docx
- 大小:26.38 KB
- 文档页数:7
Min-ETune ™ QUICK START GUIDERIGHT ON/OFF/BACKENTER/OK UPDOWNLEFT PUSH “ON” TO TURN ON SYSTEM.STRUM ALL OPEN STRINGS. STRING LED COLORS INDICATE TUNING STATUS (SEE “LED LEGEND”).WAIT 5 TO 10 SECONDS. IF SOME LEDS ARE NOT GREEN, MUTE ALL OTHER STRINGS,THEN PICK THE STRINGS WHOSE LEDS ARE RED.REPEAT STEP 3 IF NECESSARY. SYSTEM WILL TURN OFF WHEN ALL STRINGS ARE IN TUNE.PUSH AND HOLD “ON” TO TURN ON SYSTEM.PICK EACH STRING WHOSE LED IS RED AND WAIT UNTIL ITS LED TURNS GREEN.MUTE STRINGS THAT ARE TUNED AND REPEAT STEP 2 UNTIL EACH STRING‘S LED IS GREEN.SYSTEM WILL TURN OFF WHEN ALL STRINGS ARE TUNED.PUSH “ON” TO TURN ON SYSTEM.PUSH “ON” AGAIN TO ENTER MAIN MENU.PUSH “LEFT” UNTIL “B” IS SELECTED. (“B” TUNES ONE SEMITONE FLAT.SEE “TUNING OVERVIEW”).PUSH “ENTER” TO START THE TUNING PROCESS. MAKE SURE YOUR FINGERS ARE CLEAR OF THE STRINGS AND KEYS.WHEN KEYS STOP TURNING, STRUM ALL OPEN STRINGS.WAIT 5 TO 10 SECONDS. IF SOME LEDS ARE NOT GREEN, MUTE ALL OTHER STRINGS AND PICK THE STRINGS WHOSE LEDS ARE RED.REPEAT IF STEP 6 IF NECESSARY. SYSTEM WILL TURN OFF WHEN STRINGS ARE IN TUNE.MULTI-STRING TUNING:SINGLE-STRING TUNING:CHANGE TUNING FROM STANDARD E TO E b(EXAMPLE):111223456723344BEFORE YOU BEGIN, PLEASE READ THE HELPFUL TIPS AND WARNINGS AT THE END OF THIS DOCUMENT!TUNING OVERVIEW:LED LEGENDTHE RED BANK“STANDARD“ E2 A2 D3 G3 B3 E4 “DADGAD“ D2 A2 D3 G3 A3 D4 “LOW D“ D2 G2 C3 F3 A3 D4 “DROP-D“D2A2D3 G3 B3 E4 “E b “ E b 2 A b 2 D b 3 G b 3 B b 3 E b4“DOUBLE DROP-D“D2A2D3G3B3D4THE GREEN BANK“OPEN E“ E2 B2 E3 G B 3 B3 E4“OPEN A“ E2 A2 E3 A3 C B4 E4 “OPEN D“ D2 A2 D3 F B 3A3 D4 “OPEN G“ D2 G2 D3 G3 B3 D4 “DOBRO“ G2 B2 D3 G3 B3 D4“ALL 4TH “E2A2D3G3C4F4THE BLUE BANK IS USER-DEFINEDE E E6thE6thE6thA5thA5thA5thD4thD4thD4thG3rdG3rdG3rdB2ndB2ndB2nde1ste1ste1stA A D D G GB B eeiCHARGE BATTERY WITH THE SUPPLIED CHARGER. BATTERY IS FULLY CHARGED WHEN THE CHARGER‘S LED IS GREEN.!DO NOT USE ANY STRING WINDING TOOLS AS THEY MAY CAUSE DAMAGE TO THE ROBOTIC TUNING PEGS.!THE BASS SIDE ROBOHEADS TURN CLOCKWISE TO RAISE STRING PITCH AND ANTICLOCKWISE TO LOWER STRING PITCH.DOWNLOAD THE COMPLETE MANUAL FOR DETAILED INSTRUCTIONSAND IMPORTANT SAFETY INFORMATION » /Min-ETune AND STRUM HIGHER STRINGS AGAIN.i!!。
mysql8 ocp题库MySQL 8 OCP题库IntroductionMySQL is a popular open-source relational database management system (RDBMS) that is widely used for developing web-based applications. MySQL 8 is the latest version of the software and brings several new features and improvements over previous versions. In order to become a certified MySQL 8 professional, it is important to have a solid understanding of the concepts and functionality of the database. This article aims to provide a comprehensive overview of MySQL 8 OCP (Oracle Certified Professional) question bank, which covers various aspects of the database.1. Database BasicsThe MySQL 8 OCP question bank includes a set of questions that assess the candidate's knowledge of basic database concepts. These questions cover topics such as data types, normalization, indexing, and database design principles. Candidates are expected to demonstrate their understanding of these fundamental concepts and their ability to apply them in real-world scenarios.2. SQL QueriesThe question bank also includes a wide range of SQL-related questions. Candidates are tested on their ability to write and optimize SQL queries, including SELECT, INSERT, UPDATE, and DELETE statements. They are expected to understand how to join tables, use aggregate functions, and apply various filtering and sorting techniques. Additionally, candidates should have knowledge of subqueries and how to use them effectively.3. Performance Tuning and OptimizationMySQL 8 OCP question bank includes questions on performance tuning and optimization. Candidates are required to demonstrate their expertise in identifying andresolving performance issues, including slow queries, inefficient indexing, and resource utilization. They should be able to analyze query execution plans, use query optimization techniques, and configure the database server for optimal performance.4. Replication and High AvailabilityMySQL supports replication, which allows for the creation of multiple copies of a database to provide high availability and fault tolerance. The question bank includes questions on various replication scenarios, including master-slave and master-master replication. Candidates need to have a thorough understanding of replication concepts, configuration, and troubleshooting.5. Security and User ManagementSecuring a database is of utmost importance to protect sensitive data. The MySQL 8 OCP question bank assesses the candidate's knowledge of security best practices, including authentication, authorization, encryption, and backup strategies. Candidates are expected to know how to create and manage user accounts, assign appropriate privileges, and set up secure connections to the database.ConclusionBecoming an Oracle Certified Professional in MySQL 8 requires a deep understanding of the database's concepts and features. The MySQL 8 OCP question bank is designed to test candidates' knowledge and proficiency in various areas, including database basics, SQL queries, performance tuning, replication, and security. By thoroughly preparing for the exam using the question bank, candidates can validate their expertise and enhance their career opportunities in the field of database administration and development.。
常用软件词汇中英文对照英文: access中文: 访问英文: click中文: 单击英文: code中文: 代码英文: Combo box中文: 组合框英文: command中文: 命令英文: container中文: 容器英文: control中文: 控件英文: database中文: 数据库英文: Destination folder 中文: 目标文件夹英文: display中文: 显示英文: document.中文: 文档英文: double-click中文: 双击英文: drop-down中文: 下拉列表英文: editor中文: 编辑器英文: export英文: field中文: 字段英文: file中文: 文件英文: folder中文: 文件夹英文: form中文: 窗体英文: form中文: 窗体英文: format 中文: 格式英文: header 中文: 标题英文: install中文: 安装英文: macro中文: 宏英文: menu中文: 菜单英文: options 中文: 选项英文: prompt 中文: 提示英文: property 中文: 属性英文: query中文: 查询中文: 报表英文: right-click 中文: 右键单击英文: Run mode 中文: 运行模式英文: Save as中文: 另存为英文: speech中文: 语音英文: start-up 中文: 启动英文: subform 中文: 子窗体英文: tab中文: 选项卡英文: tool中文: 工具英文: toolbar中文: 工具栏英文: transform 中文: 转换英文: undo中文: 撤消英文: utility中文: 实用工具英文: view中文: 视图英文: voice中文: 声音英文: wizard中文: 向导英文: tab中文: 标签英文: syntax中文: 语法英文: convert 中文: 转换英文: database 中文: 数据库英文: utilities 中文: 实用工具英文: category 中文: 类别英文: tag中文: 标记英文: pane中文: 窗格。
Chapter1Overview of Oracle9i Database Performance TuningTuning goalsminimizing response timeincreasing throughputincreasing load capabilitiesdecreasing recovery timeTuning steps during development1design2application3memory4input/output(I/O)5contention6opersting systemChapter2Diagnostic and Tuning Toolsv$sysstat(statistic#,name,class,value)v$sgastat(pool,name,bytes)v$event_name(event number,name,parameter1,parameter2,parameter3)v$system_event(event,total_waits,total_timeouts,time_waited,average_wait)SQL>select name,class,value from v$sysstat;SQL>select*from v$sgastat;Displaying session-related statisticsv$statname(statistic#,name,class)v$sesstat(sid,statistic#,value)v$session(sid,serial#,username,osuser)v$session_event(sid,event,total_waits,total_timeouts,time_waited,average_wait,max_wait)v$event_name(event#,name,parameter1,parameter2,parameter3)v$session_wait(sid,seq#,event,ps/2/3,p1/2/3text,p1/2/3raw,wait time,seconds_in_wait,state)SQL>select sid,username,type,server from v$session;SQL>select username,name,value from v$statname n,v$session s,v$sesstat t where s.sid=t.sid and n.statistic#=t.statistic#and s.type='user' and ername is not null and ='session pga memory'and t.value>30000;SQL>select sid,event from v$session_wait where wait_time=0;SQL>select name,parameter1,parameter2,parameter3from v$event_name;SQL>select sid,event,total_Waits,average_wait from v$session_event where sid=10;SQL>select sid,seq#,event,wait_time,state from v$session_wait;wait_time{>0(the session's last wait time);=0(the session is currently waiting)=-1(the value was less than1/100of a second)=-2(the system cannot provide timing information)}SQL>select event,total_waits,total_timeouts,time_Waited,average_wait from v$system_event order by time_waited desc; Troubleshooting and tuning viewsInstance/Databasev$databasev$instancev$optionv$parameterv$backupv$px_process_sysstat:parallel query system statisticsv$process:information about currently active processv$waitstat:connection statisticsv$system_event:total waits for particular eventsDiskv$datafilev$filestat:data file read/write statisticsv$logv$log_historyv$dbfilev$tempfilev$tempstat:information about file read/write statistics for temporary tablespace data filesv$segment_statistics:offers statistics on I/O segmentConnectionv$lockv$rollnamev$rollstat:statistics for all online rollback segmentsv$waitstat:block contention statistics(the timed_statistics parameter should be set to true)v$latch:statistics for each types of latchMemoryv$buffer_pool_statistics:buffer pools allocation on the instancev$db_object_cache:database objects cached in the library cachev$librarycache:library cache performance and activity statisticsv$rowcache:data dictionary hits and misses activityv$sysstat:basic instance statisticsv$sgastatUser/Sessionv$lock:locks currently held by the server and outstanding requests for a lock or latchv$open_cursor:cursors currently opened and parsed by each sessionv$processv$transactionv$px_sesstat:information about the session executing SQL statements in parallelv$px_sessionv$sesstat:user session statisticsv$session_event:information on waits for an event by a sessionv$sort_usage:seze of temporary segment and sessions creating them;identification of process doing disk sortsv$session_waitv$sessionv$session_object_cachetestSQL>show parameter timed_statisticsSQL>altere system set timed_statistics=true;SQL>alter session set SQL_TRACE=true;SQL>select count(*)from dba_tables;SQL>alter session set SQL_TRACE=false;$cd$HOME/admin/udump$ls-l$sqlplus hr/hr$sqlplus sys/oracle as sysdbaSQL>select username,sid,serial#from v$session where username='hr';SQL>begindbms_system.set_sql_trace_in_session(&SID,&SERIALNUM,true);end;/SQL>select*from employees;SQL>begindbms_system.set_sql_trace_in_session(&SID,&SERIALNUM,false);end;/$cd$HOME/admin/udump$ls-lSQL>connect sys/oracle as sysdbaSQL>create tablespace tools datafile'$HOME/oradata/u05/tools.dbf'size100M extent management dictionary;SQL>select tablespace_name,sum(types)from dba_free_space where tablespace_name='tools'group by tablespace_name; SQL>@$HOME/student/labs/spcreate.sqlSQL>@$HOME/student/labs/snap.sqlSQL>@$HOME/student/labs/spauto.sqlSQL>select job,next_date,next_sec,last_sec from user_jobs;SQL>select sanp_id,to_char(startup_time,'dd Mon"at"HH24:mi:ss')instart_fm,to_char(snap_time,'dd Mon YYYY HH24:mi') snapdat,snap_level"level"from stats$snapshot order by snap_id;SQL>@$HOME/student/labs/spreport.sql$vi sp_x_y.1stwhere x is the starting snapshot,and y is the ending snapshot(this is true if the default report filename was used)SQL>connect sys/oracle as sysdbaSQL>select event,total_waits,time_waited from v$system_event;SQL>select sid,event,p1text,wait_time,state from v$session_wait;SQL>connect perfstat/perfstatSQL>select job,log_user from user_jobs;SQL>execute dbms_job.remove($job);SQL>alter session set sql_trace=true;SQL>select sid,serial#,username from v$session;SQL>execute dbms_system.set_sql_trace_insession(16.167.true);statspack install先阅读/u010g/oracle/rdbms/admin/spdoc.txt这文档SQL>create tablespace perfstat datafile'/u01/oradata/pitts/perfstat_01.dbf'size512M;SQL>@?/rdbms/admin/spcreate.sqlSQL>execute statspack.snap;SQL>execute statspack.snap;SQL>@?/rdbms/admin/spreport********************************************************************************德哥statspack讲解SQL>drop user perfstat cascade;SQL>drop tablespace perfstat including contents and datafiles;SQL>create tablespace perfstat datafile'/oradata/clonedb/perfsata01.dbf'size500M autoextend on;SQL>@?/rdbms/admin/spcreate.sql如过运行出错SQL>@?/rdbms/admin/spdrop.sql然后在安装SQL>@?/rdbms/admin/spcreate.sql查看相关文档cat spcusr.listSQL>connect perfstat/perfstatSQL>execute statspack.snap;SQL>select*from stats$statspack_parameter;SQL>select*from stats$snapshot;然后在执行一次SQL>execute statspack.snap;vi spauto.sqlvariable jobno number;variable instno number;beginselect instance_number into:instno from v$instance;dbms_job.submit(:jobno,'statspack.snap;',trunc(sysdate+1/24,'HH'),'trunc(SYSDATE+1/24,''HH'')',TRUE,:instno);commit;end;/SQL>execute dbms_job.interval(62,'sysdate+1/(24*60)');SQL>select*from user_jobs;report1、instance reportspreport.sqlsprepins.sql(multi-instance)2、sql reportsprepsql.sqlsprsqins.sql(multi-instance)vi$HOME/rdbms/admin/sprepcon.sqldefine num_days='';SQL>@?/rdbms/admin/spreport.sql(生成报告)SQL>@?/rdbms/admin/sprepins.sqlSQL>@?/rdbms/admin/sprepsql.sqlConfigure1database parameters2snapshot parameters3instance report parameters4sql report parametersSQL>desc stats$statspack_parameter;SQL>select SNAP_LEVEL from stats$statspack_parameter;SQL>execute statspack.snap<i_snap_level=>7>;SQL>execute statspack.snap<i_snap_level=>7,i_modify_parameter=>'true'>;使用包更改SQL>execute statspack.modify_statspack_parameter<i_snap_level=>6>;SQL>select SNAP_LEVEL from stats$statspack_parameter;停止脚步执行SQL>execute dbms_job.remove(62);SQL>select*from user_jobs;maintenanceMake_baseline&clear_baselinePurge snapshot except baselineTruncate all tables with perfstat schemaDrop perfstat schema;SQL>define i_begin_snap=1SQL>define i_end_snap=16SQL>execute statspacl.make_baseline(i_begin_snap=>1,i_end_snap=>16);SQL>execute statspack.purge(i_begin_snap=>1,i_end_snap=>73);SQL>execute statspace.clear_baseline(i_begin_snap=>1,i_end_snap=>16,i_snap_range=>false);SQL>execute statspack.purge(i_begin_snap=>1,i_end_snap=>16);SQL>select snap_id from stats$snapshot;********************************************************************************Chapter3Database Configuration and I/O IssuesUsing the v$filestat viewSQL>select phyrds,phywrts, from v$datafile d,v$filestat f where d.file#=f.file#order by ;I/O statisticsSQL>select d.tablespace_name tablespace,d.file_name,f.phyrds,f.phywrts from v$filestat f,dba_data_files d where f.file#=d.file_id; Table Scan statisticsSQL>select name,value from v$sysstat where name like'table scan%';Determine the progress of long operations usingSQL>select sid,serial#,opname,to_char(start_time,'HH24:MI:SS')as"start",(sofar/totalwork)*100as percent_complete from v$session_longops;Use set_session_longops to populate v$session_longopsdbms_application_info.set_session_longops(rindex,slno,"Operation X",obj,0,sofar,totalwork,"table","tables");Monitoring full table scan operationsdeclarerindex binary_integer;slno binary_integer;totalwork number;sofar number;obj binary_integer;beginrindex:=dbms_application_info.set_session_longops_nohint;sofar:=0;totalwork:=10;while sofar<10loop--update obj based on sofar and perform task on object targetsofar:=sofar+1;dbms_application_info.set_session_longops(rindex,slno,"Operation X",obj,0,sofar,totalwork,"table","tables");end loop;end;DB_FILE_MULTINLOCK_READ_COUNT:是指oracle一次IO读出的最大块数,同时也受操作系统限制如:oracle一次IO读64K,但是,操作系统只能读32K,这样就受到限制。
AIX性能调优系统资源(物理资源,逻辑资源)系统瓶颈性能概念一个程序执行步骤性能调整流程Instructor GuideFigure 1-6. Program Execution Hierarchy AU187.0 Notes:IntroductionIn the graphic above, the left side represents hardware entities that are loosely matched to the appropriate operating system entity on the right side. A program must go from the lowest level of being stored on disk, to the highest level being the processor running program instructions.Hardware hierarchy overviewWhen a program runs, it makes its way up the hardware and operating systemhierarchies, more or less in parallel. Each level on the hardware side is scarcer and more expensive than the one below it. There is contention for resources amongprograms and time spent in transitional from one level to the next. Usually, the time required to move from one hardware level to another consists primarily of the latency of the lower level, that is, the time from the issuing of a request to the receipt of the first data.1-18 AIX 5L System Administration III© Copyright IBM Corp. 2000, 2006Course materials may not be reproduced in whole or in partInstructor Guide Disks are the slowest hardware operationBy far the slowest operation that a running program does (other than waiting on a human keystroke) is to obtain code or data from a disk. Disk operations are necessary for read or write requests for programs. System tuning activities frequently turn out to be hunts for unnecessary disk I/O or searching for disk bottlenecks since disk operations are the slowest operations. For example, can the system be tuned to reduce paging? Is one disk too busy causing higher seek times because it has multiple filesystems which have a lot of activity?Real memoryRandom Access Memory (RAM) access is fast compared to disk, but much moreexpensive per byte. Operating systems try to keep program code and data that are in use in RAM. When the operating system begins to run out of free RAM, it needs to make decisions about what types of pages to write out to disk. Virtual memory is the ability of a system to use disk space as an extension of RAM to allow for more efficient use of RAM.Paging and page faultsIf the operating system needs to bring a page into RAM that has been written to disk or has not been brought in yet, a page fault occurs, and the execution of the program is suspended until the page has been read in from disk. Paging is a normal part of the operation of a multi-processing system. Paging becomes a performance issue when free RAM is short and pages which are in memory are paged-out and then paged back in again causing process threads to wait for slower disk operations. How virtual memory works will be covered in another unit of this course.Translation Lookaside Buffers (TLBs)One of the ways that programmers are insulated from the physical limitations of the system is the implementation of virtual memory. The programmer designs and codes the program as though the memory were very large, and the system takes responsibility for translating the program's virtual addresses for instructions and data into realaddresses that are needed to get the instructions and data from RAM. Since thisaddress-translation process is time-consuming, the system keeps the real addresses of recently accessed virtual memory pages in a cache called the Translation Lookaside Buffer (TLB).As long as the running program continues to access a small set of program and data pages, the full virtual-to-real page-address translation does not need to be redone for each RAM access. When the program tries to access a virtual-memory page that does not have a TLB entry, called a TLB miss, dozens of processor cycles, called theTLB-miss latency are required to perform the address translation.© Copyright IBM Corp. 2000, 2006Unit 1. Performance Analysis and Tuning Overview1-19Course materials may not be reproduced in whole or in partInstructor GuideCachesTo minimize the number of times the program has to experience the RAM latency, systems incorporate caches for instructions and data. If the required instruction or data is already in the cache (a cache hit), it is available to the processor on the next cycle (that is, no delay occurs); otherwise, a cache miss occurs. If a given access is both a TLB miss and a cache miss, both delays occur consecutively.Depending on the hardware architecture, there are two or three levels of cache, usually called L1, L2, and L3. If a particular storage reference results in an L1 miss, then L2 is checked. If L2 generates a miss, then the reference goes to the next level, either L3, if it is present, or RAM.Pipeline and registersA pipelined, superscalar architecture allows for the simultaneous processing of multipleinstructions, under certain circumstances. Large sets of general-purpose registers and floating-point registers make it possible to keep considerable amounts of the program's data in registers, rather than continually storing and reloading the data.Operating system hierarchy overviewThe operating system works on a thread level. When a user requests the execution of a program, AIX performs a number of operations to transform the executable program on disk to a running program. First, the directories in the user's current PATH must be scanned to find the correct copy of the program. Then the system loader (not to be confused with ld, the binder) must resolve any external references from the program to shared libraries. Finally, the system branches to the entry point of the program and the resulting page fault causes the program page that contains the entry point to be brought into RAM.Interrupt handlersThe mechanism for notifying the operating system that an external event has taken place is to interrupt the currently running thread and transfer control to an interrupt handler (FLIH or SLIH). Before the interrupt handler can run, enough of thegeneral-purpose registers must be saved to ensure that the system can restore the context of the running thread after interrupt handling is complete.ThreadsA thread is the current execution state of a single instance of a program. In AIX, accessto the processor and other resources is allocated on a thread basis, rather than a process basis. Multiple threads can be created within a process by the application program. Those threads share the resources owned by the process within which they are running.1-20 AIX 5L System Administration III© Copyright IBM Corp. 2000, 2006Course materials may not be reproduced in whole or in partWaiting threadsWhenever an executing thread makes a request that cannot be satisfied immediately, such as an I/O operation (either explicit or as the result of a page fault) or the granting ofa lock, it is put in a Wait state until that request is complete. Normally, this results inanother set of TLB and cache latencies, in addition to the time required for the request itself. However, it also allows other threads which are ready to run to gain access to the CPU.When a thread is replaced by another thread on a CPU, this is a context switch. A context switch can also occur when a thread finishes its timeslice or, as stated above, it must wait for a resource. Whenever a context switch occurs, there may be additional latencies due to cache misses. Context switches are a normal function of amulti-processing system, but an abnormally high rate of context switches could be a symptom of a performance problem.Dispatchable threadsWhen a thread is dispatchable, but not actually running, it is put in a run queue to run on an available CPU. If a CPU is available, it will run right away, otherwise it must wait. Currently dispatched threadThe scheduler chooses the thread that has the strongest claim to use the processor.When the thread is dispatched, the logical state of the processor is restored to what was in effect when the thread was last interrupted.Effect of the use of cache, RAM, and paging space on program performanceAccess time for the various components increase exponentially as you move away from the processor. For example, a one second access time for a 1 GHz CPU would be the equivalent of 100 seconds for a L3 cache access, 6 minutes for a RAM access, and 115 days for a local disk access! As you can see, the closer you are to the core, the faster the access is. Understanding how to reduce more expensive (performance-wise)bottlenecks is key to performance management.© Copyright IBM Corp. 2000, 2006Unit 1. Performance Analysis and Tuning Overview1-21Course materials may not be reproduced in whole or in partFigure 1-8. Performance Analysis Flowchart AU187.0 Notes:Tuning is a processThe flowchart in the visual above can be used for performance analysis and it illustrates that tuning is an iterative process. We will be following this flowchart throughout our course.The starting point for this flowchart is the Normal Operations box. The first piece of data you need is a performance goal. Only by having a goal, or a set of goals, can you tell if there is a performance problem. The goals may be something like a specific response time for an interactive application or a specific length of time in which a batch job needs to complete. Tuning without a specific goal could in fact lead to the degradation of system performance.Once you decide there is a performance problem and you analyze and tune the system, you must then go back to the performance goals to evaluate whether more tuning needs to occur.© Copyright IBM Corp. 2000, 2006Unit 1. Performance Analysis and Tuning Overview1-27Course materials may not be reproduced in whole or in partAdditional testsThe additional tests that you perform at the bottom right of the flowchart relate to the four previous categories of resource contention. If the specific bottleneck is well hidden, or you missed something, then you must keep testing to figure out what is wrong. Even when you think you’ve found a bottleneck, it’s a good idea to do additional tests to identify more detail or to make sure one bottleneck is not masquerading as another. For example, you may find a disk bottleneck, but in reality it’s a memory bottleneck causing excessive paging.1-28 AIX 5L System Administration III© Copyright IBM Corp. 2000, 2006Course materials may not be reproduced in whole or in partFigure 1-9. Performance Analysis Tools AU187.0 Notes:CPU analysis toolsCPU metrics analysis tools include:-vmstat, iostat, sar, lparstat and mpstat which are packaged with bos.acct -ps which is in bos.rte.control-cpupstat which is part of mands-gprof and prof which are in bos.adt.prof-time (built into the various shells) or timex which is part of bos.acct-emstat and alstat are emulation and alignment tools from bos.perf.tools-netpmon, tprof, locktrace, curt, splat, and topas are in bos.perf.tools-trace and trcrpt which are part of bos.sysmgt.trace-truss is in bos.sysmgt.ser_aids1-30 AIX 5L System Administration III© Copyright IBM Corp. 2000, 2006Course materials may not be reproduced in whole or in partInstructor Guide-smtctl is in bos.rte.methods-Performance toolbox tools such as xmperf, 3dmon which are part of perfmgr Memory subsystem analysis toolsSome of the memory metric analysis tools are:-vmstat which is packaged with bos.acct-lsps which is part of bos.rte.lvm-topas, svmon and filemon are part of bos.perf.tools-Performance toolbox tools such as xmperf, 3dmon which are part of perfmgr-trace and trcrpt which are part of bos.sysmgt.trace-lparstat is part of bos.acctI/O subsystem analysis toolsI/O metric analysis tools include:-iostat and vmstat are packaged with bos.acct-lsps, lspv, lsvg, lslv and lvmstat are in bos.rte.lvm-lsattr and lsdev are in bos.rte.methods-topas, filemon, and fileplace are in bos.perf.tools-Performance toolbox tools such as xmperf, 3dmon which are part of perfmgr-trace and trcrpt which are part of bos.sysmgt.traceNetwork subsystem analysis toolsNetwork metric analysis tools include:-lsattr and netstat which are part of .tcp.client-nfsstat and nfs4cl as part of .nfs.client-topas and netpmon are part of bos.perf.tools-ifconfig as part of .tcp.client-iptrace and ipreport are part of .tcp.server-tcpdump which is part of .tcp.server-Performance toolbox tools such as xmperf, 3dmon which are part of perfmgr-trace and trcrpt which are part of bos.sysmgt.trace© Copyright IBM Corp. 2000, 2006Unit 1. Performance Analysis and Tuning Overview1-31Course materials may not be reproduced in whole or in partInstructor GuideAIX 5L V5.3 enhancements to analysis toolsSeveral changes were made in AIX 5L V5.3 to the analysis tools. Changes were made at different maintenance levels for V5.3.The tprof command has new -E option to enable event based profiling and the new -f option allows you to set the sampling frequency for event-based profiling. There were updates to PMAPI including updates to pmlist and there are two new commands for hardware analysis: hpmcount and hpmstat. These are not covered in this course.The topas command has a new -D panel for disk analysis.There are new commands for obtaining statistics specific to a logical partition. These give statistics for POWER Hypervisor activity or for tracking real CPU utilization in a simultaneous multi-threading or shared processor (Micro-Partition) environment. A new register was added called the Processor Utilization Resource Register (PURR) to track logical and virtual processor activity. Commands such as sar and topas willautomatically use the new PURR statistics when in a simultaneous multi-threading or shared processor (Micro-Partition) environment and you will see new columns reporting partition statistics in those environments. Trace-based commands now have new hooks for viewing PURR data. Some commands such as lparstat, mpstat, and smtctl are new for AIX 5L V5.3 and work in a partitioned environment.The AIX 5L Virtualization Performance Management course covers all differences in performance analysis and tuning in a partitioned environment.1-32 AIX 5L System Administration III© Copyright IBM Corp. 2000, 2006Course materials may not be reproduced in whole or in partInstructor GuideFigure 1-10. Performance Tuning Process AU187.0 Notes:OverviewPerformance tuning is one aspect of performance management. The definition ofperformance tuning sounds simple and straight forward, but it’s actually a complex process.Performance tuning involves managing your resources. Resources could be logical (queues, buffers, etc.) or physical (real memory, disks, CPUs, network adapters, etc.).Resource management involves the various tasks listed here. We will examine each of these tasks later.Tuning always must be done based on performance analysis. While there arerecommendations as to where to look for performance problems, what tools to use, and what parameters to change, what works on one system may not work on another. So there is no cookbook approach available for performance tuning that will work for all systems.The wheel graphic in the visual above represents the phases of a more formal tuning project. Experiences with tuning may range from the informal to the very formal where reports and reviews are done prior to changes being made. Even for informal tuning actions, it is essential to plan, gather data, develop a recommendation, implement, and document.Figure 1-11. Performance Tuning Tools AU187.0 Notes:CPU tuning toolsCPU tuning tools include:-nice, renice, and setpri modify priorities.nice and renice are in the bos.rte.control fileset.setpri is a command available with the perfpmr package.-schedo (schedtune in AIX 5L V5.1) modifies scheduler algorithms (in the bos.perf.tune fileset).-bindprocessor binds processes to CPUs (in the bos.mp fileset).-chdev modifies certain system tunables (in the bos.rte.methods fileset).-bindintcpu can bind an adapter interrupt to a specific CPU (in thedevices.chrp.base.rte fileset).-procmon is in bos.perf.gtools.Instructor GuideMemory tuning toolsMemory tuning tools include:-vmo and ioo (vmtune in AIX 5L V5.1) for various VMM, file system, and LVM parameters (in bos.perf.tune fileset)-chps and mkps modify paging space attributes (in bos.rte.lvm fileset)-fdpr rearranges basic blocks in an executable so that memory footprints become smaller and cache misses are reduced (in perfagent.tools fileset) -chdev modifies certain system tunables (in bos.rte.methods fileset)I/O tuning toolsI/O tuning tools include:-vmo and ioo modify certain file system and LVM parameters (in bos.perf.tune fileset) (Use vmtune prior to AIX 5L V5.2.)-chdev modifies system tunables such as disk and disk adapter attributes (in bos.rte.methods fileset)-migratepv moves logical volumes from one disk to another (in bos.rte.lvm fileset) -lvmo displays or sets pbuf tuning parameters (in bos.rte.lvm fileset)-chlv modifies logical volume attributes (in bos.rte.lvm fileset)-reorgvg moves logical volumes around on a disk (in bos.rte.lvm fileset)Network tuning toolsNetwork tuning tools include:-no modifies network options (in .tcp.client fileset)-nfso modifies NFS options (in .nfs.client fileset)-chdev modifies network adapter attributes (in bos.rte.methods fileset)-ifconfig modifies network interface attributes (in .tcp.client fileset)CPU在定位CPU性能问题时,从监视 CPU 使用率的统计数据入手。
Installation GuideTABLE OF CONTENTS Chapter 1. Overview (1)Chapter 2. Installing cuDNN On Linux (2)2.1. Prerequisites (2)2.1.1. Installing NVIDIA Graphics Drivers (2)2.1.2. Installing The CUDA T oolkit For Linux (2)2.2. Downloading cuDNN For Linux (2)2.3. Installing cuDNN On Linux (3)2.3.1. Installing From A T ar File (3)2.3.2. Installing From A Debian File (3)2.3.3. Installing From An RPM File (4)2.4. Verifying The cuDNN Install On Linux (4)2.5. Upgrading From v6 T o v7 (4)2.6. Troubleshooting (4)Chapter 3. Installing cuDNN On Mac OS X (5)3.1. Prerequisites (5)3.1.1. Installing NVIDIA Graphics Drivers (5)3.1.2. Installing The CUDA T oolkit For Mac OS X (5)3.2. Downloading cuDNN For Mac OS X (5)Chapter 4. Installing cuDNN On Windows (7)4.1. Prerequisites (7)4.1.1. Installing NVIDIA Graphic Drivers (7)4.1.2. Installing The CUDA T oolkit For Windows (7)4.2. Downloading cuDNN For Windows (7)4.3. Installing cuDNN On Windows (8)4.4. Upgrading From v6 T o v7 (9)4.5. Troubleshooting (9)Chapter 5. Cross-compiling cuDNN Samples (10)5.1. NVIDIA DRIVE OS Linux (10)5.1.1. Installing The CUDA T oolkit For DRIVE OS (10)5.1.2. Installing cuDNN For DRIVE OS (10)5.2. QNX (11)5.2.1. Installing The CUDA T oolkit For QNX (11)5.2.2. Installing cuDNN For QNX (11)5.2.3. Set The Environment Variables (11)5.2.4. Cross-compiling cuDNN Samples For QNX (11)Chapter 6. Package Manager Installation (12)6.1. Network Installation (12)6.1.1. Ubuntu (12)6.1.2. RHEL (12)The NVIDIA CUDA Deep Neural Network library (cuDNN) is a GPU-accelerated library of primitives for deep neural networks. cuDNN provides highly tuned implementations for standard routines such as forward and backward convolution, pooling, normalization, and activation layers. cuDNN is part of the NVIDIA Deep Learning SDK.Deep learning researchers and framework developers worldwide rely on cuDNN for high-performance GPU acceleration. It allows them to focus on training neural networks and developing software applications rather than spending time on low-level GPU performance tuning. cuDNN accelerates widely used deep learning frameworks and is freely available to members of the NVIDIA Developer Program.2.1. PrerequisitesEnsure you meet the following requirements before you install cuDNN.‣ A GPU of compute capability 3.0 or higher. To understand the compute capability of the GPU on your system, see: CUDA GPUs.‣For the latest compatibility software versions of the OS, CUDA, the CUDA driver, and the NVIDIA hardware, see the cuDNN Support Matrix.2.1.1. Installing NVIDIA Graphics DriversInstall up-to-date NVIDIA graphics drivers on your Linux system.1.Go to: NVIDIA download drivers2.Select the GPU and OS version from the drop down menus.3.Download and install NVIDIA graphics driver as indicated in that webpage. Formore information, select the ADDITIONAL INFORMATION tab for step-by-step instructions for installing a driver.4.Restart your system to ensure the graphics driver takes effect.2.1.2. Installing The CUDA T oolkit For LinuxRefer to the following instructions for installing CUDA on Linux, including the CUDA driver and toolkit: NVIDIA CUDA Installation Guide for Linux.2.2. Downloading cuDNN For LinuxIn order to download cuDNN, ensure you are registered for the NVIDIA Developer Program.1.Go to: NVIDIA cuDNN home page.2.Click Download.plete the short survey and click Submit.4.Accept the Terms and Conditions. A list of available download versions of cuDNNdisplays.5.Select the cuDNN version you want to install. A list of available resources displays.2.3. Installing cuDNN On LinuxThe following steps describe how to build a cuDNN dependent program. Choosethe installation method that meets your environment needs. For example, the tar file installation applies to all Linux platforms, and the debian installation package applies to Ubuntu 14.04,16.04, and 18.04.In the following sections:‣your CUDA directory path is referred to as /usr/local/cuda/‣your cuDNN download path is referred to as <cudnnpath>2.3.1. Installing From A T ar File1.Navigate to your <cudnnpath> directory containing the cuDNN Tar file.2.Unzip the cuDNN package.$ tar -xzvf cudnn-9.0-linux-x64-v7.tgz3.Copy the following files into the CUDA Toolkit directory, and change the filepermissions.$ sudo cp cuda/include/cudnn.h /usr/local/cuda/include$ sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64$ sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*2.3.2. Installing From A Debian File1.Navigate to your <cudnnpath> directory containing cuDNN Debian file.2.Install the runtime library, for example:sudo dpkg -i libcudnn7_7.0.3.11-1+cuda9.0_amd64.deb3.Install the developer library, for example:sudo dpkg -i libcudnn7-devel_7.0.3.11-1+cuda9.0_amd64.deb4.Install the code samples and the cuDNN Library User Guide, for example:sudo dpkg -i libcudnn7-doc_7.0.3.11-1+cuda9.0_amd64.deb2.3.3. Installing From An RPM File1.Download the rpm package libcudnn*.rpm to the local path.2.Install the rpm package from the local path. This will install the cuDNN libraries.rpm -ivh libcudnn7-*.x86_64.rpmrpm -ivh libcudnn7-devel-*.x86_64.rpmrpm -ivh libcudnn7-doc-*.x86_64.rpm2.4. Verifying The cuDNN Install On LinuxTo verify that cuDNN is installed and is running properly, compile the mnistCUDNN sample located in the /usr/src/cudnn_samples_v7 directory in the debian file.1.Copy the cuDNN sample to a writable path.$cp -r /usr/src/cudnn_samples_v7/ $HOME2.Go to the writable path.$ cd $HOME/cudnn_samples_v7/mnistCUDNNpile the mnistCUDNN sample.$make clean && make4.Run the mnistCUDNN sample.$ ./mnistCUDNNIf cuDNN is properly installed and running on your Linux system, you will see a message similar to the following:Test passed!2.5. Upgrading From v6 T o v7cuDNN v7 can coexist with previous versions of cuDNN, such as v5 or v6.2.6. TroubleshootingJoin the NVIDIA Developer Forum to post questions and follow discussions.3.1. PrerequisitesEnsure you meet the following requirements before you install cuDNN.‣ A GPU of compute capability 3.0 or higher. To understand the compute capability of the GPU on your system, see: CUDA GPUs.‣For the latest compatibility software versions of the OS, CUDA, the CUDA driver, and the NVIDIA hardware, see the cuDNN Support Matrix.3.1.1. Installing NVIDIA Graphics DriversInstall up-to-date NVIDIA graphics drivers on your Mac OS X system.1.Go to: NVIDIA download drivers2.Select the GPU and OS version from the drop down menus.3.Download and install NVIDIA graphics driver 396 or newer. For more information,select the ADDITIONAL INFORMATION tab for step-by-step instructions forinstalling a driver.4.Restart your system to ensure the graphics driver takes effect.3.1.2. Installing The CUDA T oolkit For Mac OS XRefer to the following instructions for installing CUDA on Mac OS X, including the CUDA driver and toolkit: NVIDIA CUDA Installation Guide for Mac OS X.3.2. Downloading cuDNN For Mac OS XIn order to download cuDNN, ensure you are registered for the NVIDIA Developer Program.Installing cuDNN On Mac OS X1.Go to: NVIDIA cuDNN home page.2.Click Download.plete the short survey and click Submit.4.Accept the Terms and Conditions. A list of available download versions of cuDNNdisplays.5.Select the cuDNN version to want to install. A list of available resources displays.6.Extract the cuDNN archive to a directory of your choice.4.1. PrerequisitesEnsure you meet the following requirements before you install cuDNN.‣ A GPU of compute capability 3.0 or higher. To understand the compute capability of the GPU on your system, see: CUDA GPUs.‣For the latest compatibility software versions of the OS, CUDA, the CUDA driver, and the NVIDIA hardware, see the cuDNN Support Matrix.4.1.1. Installing NVIDIA Graphic DriversInstall up-to-date NVIDIA graphics drivers on your Windows system.1.Go to: NVIDIA download drivers2.Select the GPU and OS version from the drop down menus.3.Download and install NVIDIA driver as indicated in that webpage. For moreinformation, select the ADDITIONAL INFORMATION tab for step-by-stepinstructions for installing a driver.4.Restart your system to ensure the graphics driver takes effect.4.1.2. Installing The CUDA T oolkit For WindowsRefer to the following instructions for installing CUDA on Windows, including the CUDA driver and toolkit: NVIDIA CUDA Installation Guide for Windows.4.2. Downloading cuDNN For WindowsIn order to download cuDNN, ensure you are registered for the NVIDIA Developer Program.Installing cuDNN On Windows1.Go to: NVIDIA cuDNN home page.2.Click Download.plete the short survey and click Submit.4.Accept the Terms and Conditions. A list of available download versions of cuDNNdisplays.5.Select the cuDNN version to want to install. A list of available resources displays.6.Extract the cuDNN archive to a directory of your choice.4.3. Installing cuDNN On WindowsThe following steps describe how to build a cuDNN dependent program. In the following sections the CUDA v9.0 is used as example:‣Your CUDA directory path is referred to as C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0‣Your cuDNN directory path is referred to as <installpath>1.Navigate to your <installpath> directory containing cuDNN.2.Unzip the cuDNN package.cudnn-9.0-windows7-x64-v7.ziporcudnn-9.0-windows10-x64-v7.zip3.Copy the following files into the CUDA Toolkit directory.a)Copy <installpath>\cuda\bin\cudnn64_7.dll to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin.b)Copy <installpath>\cuda\ include\cudnn.h to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include.c)Copy <installpath>\cuda\lib\x64\cudnn.lib to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\lib\x64.4.Set the following environment variables to point to where cuDNN is located. Toaccess the value of the $(CUDA_PATH) environment variable, perform the following steps:a)Open a command prompt from the Start menu.b)Type Run and hit Enter.c)Issue the control sysdm.cpl command.d)Select the Advanced tab at the top of the window.e)Click Environment Variables at the bottom of the window.f)Ensure the following values are set:Variable Name: CUDA_PATHVariable Value: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.05.Include cudnn.lib in your Visual Studio project.a)Open the Visual Studio project and right-click on the project name.Installing cuDNN On Windowsb)Click Linker > Input > Additional Dependencies.c)Add cudnn.lib and click OK.4.4. Upgrading From v6 T o v7cuDNN v7 can coexist with previous versions of cuDNN, such as v5 or v6.4.5. TroubleshootingJoin the NVIDIA Developer Forum to post questions and follow discussions.This section describes how to cross-compile cuDNN samples.5.1. NVIDIA DRIVE OS LinuxFollow the below steps to cross-compile cuDNN samples on NVIDIA DRIVE OS Linux.5.1.1. Installing The CUDA T oolkit For DRIVE OS1.Download the CUDA for Ubuntu package:cuda*ubuntu*_amd64.deb2.Download the cross compile package: cuda*-cross-aarch64*_all.deb3.Execute the following commands:a.$ sudo dpkg -i cuda*ubuntu*_amd64.debb.$ sudo dpkg -i cuda*-cross-aarch64*_all.debc.$ sudo apt-get updated.$ sudo apt-get install cuda-toolkit-10-1 -ye.$ sudo apt-get install cuda-cross-aarch64* -y5.1.2. Installing cuDNN For DRIVE OS1.Download the cuDNN Ubuntu package for your preferred CUDA Toolkit version: *libcudnn7-cross-aarch64_*.deb2.Download the cross compile package: libcudnn7-devel-cross-aarch64_*.deb3.Execute the following commands:a.$ sudo dpkg -i *libcudnn7-cross-aarch64_*.debb.$ sudo dpkg -i libcudnn7-devel-cross-aarch64_*.deb5.1.3. Cross-compiling cuDNN Samples For DRIVE OS Copy the cudnn_samples_v7 directory to your home directory:$ cp -r /usr/src/cudnn_samples_v7 $HOMEFor each sample, execute the following commands:Cross-compiling cuDNN Samples1.$ cd $HOME/cudnn_samples_v7/(each sample)2.$ make TARGET_ARCH=aarch645.2. QNXFollow the below steps to cross-compile cuDNN samples on QNX:5.2.1. Installing The CUDA T oolkit For QNX1.Download the CUDA for Ubuntu package:cuda*ubuntu*_amd64.deb2.Download the cross compile package: cuda*-cross-aarch64*_all.deb3.Execute the following commands:a.$ sudo dpkg -i cuda*ubuntu*_amd64.debb.$ sudo dpkg -i cuda*-cross-aarch64*_all.debc.$ sudo apt-get updated.$ sudo apt-get install cuda-toolkit-10-1 -ye.$ sudo apt-get install cuda-cross-aarch64* -y5.2.2. Installing cuDNN For QNX1.Download the cuDNN Ubuntu package for your preferred CUDA Toolkit version: *libcudnn7-cross-aarch64_*.deb2.Download the cross compile package: libcudnn7-devel-cross-aarch64_*.deb3.Execute the following commands:a.$ sudo dpkg -i *libcudnn7-cross-aarch64_*.debb.$ sudo dpkg -i libcudnn7-devel-cross-aarch64_*.deb5.2.3. Set The Environment VariablesTo set the environment variables, issue the following commands:1.export CUDA_PATH={PATH}/install/cuda/2.export QNX_HOST={PATH}/host/linux/x86_643.export QNX_TARGET={PATH}/target/qnx75.2.4. Cross-compiling cuDNN Samples For QNXCopy the cudnn_samples_v7 directory to your home directory:$ cp -r /usr/src/cudnn_samples_v7 $HOMEFor each sample, execute the following commands:1.$ cd $HOME/cudnn_samples_v7/(each sample)2.$ make TARGET_OS=QNX TARGET_ARCH=aarch64 HOST_COMPILER={SET FULL PATH toYOUR CROSS COMPILER}For example: make TARGET_OS=QNX TARGET_ARCH=aarch64 HOST_COMPILER= $QNX_HOST/usr/bin/aarch64-unknown-nto-qnx7.0.0-g++The Package Manager installation interfaces with your system's package manager. When using RPM or Deb, the downloaded package is a repository package, not the actual installation package. This repository package informs the package manager only where to find the actual installation packages, but will not install them.If the actual installation packages are available in an online repository, they will be automatically downloaded in a later step. Otherwise, the repository package also installs a local repository containing the installation packages on the system.Whether the repository is available online or installed locally, the installation procedure is identical and made of several steps. See below.6.1. Network Installation6.1.1. Ubuntu1.Download and install the repository: sudo dpkg -i http:///compute/machine-learning/repos/ubuntu1604/ x86_64/nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb2.Execute the steps below to install cuDNN library:a.$ sudo apt-get update && sudo apt-get install libcudnn7-develb.$ sudo apt-get install libcudnn7=[cudnn_version+cuda_version]c.$ sudo apt-get install libcudnn7-devel=[cudnn_version+cuda_version]For example, for CUDA 9.0 and cuDNN 7.4.1:$ sudo apt-get install libcudnn7=7.4.1.5-1+cuda9.0 sudo apt-get installlibcudnn7-devel=7.4.1.5-1+cuda9.06.1.2. RHEL1.Download and install the repository: rpm -ivh http:///compute/machine-learning/repos/rhel7/x86_64/ nvidia-machine-learning-repo-rhel7-1.0.0-1.x86_64.rpmPackage Manager Installation2.Install the cuDNN library:a.For the latest version:$ sudo yum install libcudnn7$ sudo yum install libcudnn7-develb.For other versions:$ sudo yum install libcudnn7=[cudnn_version+cuda_version]$ sudo yum install libcudnn7-devel=[cudnn_version+cuda_version]For example, for CUDA 9.0 and cuDNN 7.4.2:$ sudo yum install libcudnn7=7.4.2.24-1+cuda9.0$ sudo yum install libcudnn7-devel=7.4.2.24-1+cuda9.0NoticeTHE INFORMATION IN THIS GUIDE AND ALL OTHER INFORMATION CONTAINED IN NVIDIA DOCUMENTATION REFERENCED IN THIS GUIDE IS PROVIDED “AS IS.” NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO THE INFORMATION FOR THE PRODUCT, AND EXPRESSL Y DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. Notwithstanding any damages that customer might incur for any reason whatsoever, NVIDIA’s aggregate and cumulative liability towards customer for the product described in this guide shall be limited in accordance with the NVIDIA terms and conditions of sale for the product.THE NVIDIA PRODUCT DESCRIBED IN THIS GUIDE IS NOT FAULT TOLERANT AND IS NOT DESIGNED, MANUFACTURED OR INTENDED FOR USE IN CONNECTION WITH THE DESIGN, CONSTRUCTION, MAINTENANCE, AND/OR OPERATION OF ANY SYSTEM WHERE THE USE OR A FAILURE OF SUCH SYSTEM COULD RESULT IN A SITUATION THAT THREATENS THE SAFETY OF HUMAN LIFE OR SEVERE PHYSICAL HARM OR PROPERTY DAMAGE (INCLUDING, FOR EXAMPLE, USE IN CONNECTION WITH ANY NUCLEAR, AVIONICS, LIFE SUPPORT OR OTHER LIFE CRITICAL APPLICATION). NVIDIA EXPRESSL Y DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR SUCH HIGH RISK USES. NVIDIA SHALL NOT BE LIABLE TO CUSTOMER OR ANY THIRD PARTY, IN WHOLE OR IN PART, FOR ANY CLAIMS OR DAMAGES ARISING FROM SUCH HIGH RISK USES.NVIDIA makes no representation or warranty that the product described in this guide will be suitable for any specified use without further testing or modification. T esting of all parameters of each product is not necessarily performed by NVIDIA. It is customer’s sole responsibility to ensure the product is suitable and fit for the application planned by customer and to do the necessary testing for the application in order to avoid a default of the application or the product. Weaknesses in customer’s product designs may affect the quality and reliability of the NVIDIA product and may result in additional or different conditions and/ or requirements beyond those contained in this guide. NVIDIA does not accept any liability related to any default, damage, costs or problem which may be based on or attributable to: (i) the use of the NVIDIA product in any manner that is contrary to this guide, or (ii) customer product designs.Other than the right for customer to use the information in this guide with the product, no other license, either expressed or implied, is hereby granted by NVIDIA under this guide. Reproduction of information in this guide is permissible only if reproduction is approved by NVIDIA in writing, is reproduced without alteration, and is accompanied by all associated conditions, limitations, and notices.TrademarksNVIDIA, the NVIDIA logo, and cuBLAS, CUDA, cuDNN, DALI, DIGITS, DGX, DGX-1, DGX-2, DGX Station, DLProf, Jetson, Kepler, Maxwell, NCCL, Nsight Compute, Nsight Systems, NvCaffe, PerfWorks, Pascal, SDK Manager, T egra, T ensorRT, T ensorRT Inference Server, T esla, TF-TRT, and Volta are trademarks and/or registered trademarks of NVIDIA Corporation in the United States and other countries. Other company and product names may be trademarks of the respective companies with which they are associated.Copyright© 2019 NVIDIA Corporation. All rights reserved.。
Performance Tuning OverviewThis chapter provides an introduction to performance tuning.This chapter contains the following:∙Introduction to Performance Tuning∙Introduction to Performance Tuning Features and ToolsIntroduction to Performance TuningThis guide provides information on tuning an Oracle Database system for performance. Topics discussed in this guide include:∙Performance Planning∙Instance Tuning∙SQL TuningPerformance PlanningBefore you start on the instance or SQL tuning sections of this guide, make sure you have read Part II, "Performance Planning". Based on years of designing and performance experience, Oracle has designed a performance methodology. This brief section explains clear and simple activities that can dramatically improve system performance. It discusses the following topics:∙Investment Options∙Scalability∙System Architecture∙Application Design Principles∙Workload Testing, Modeling, and Implementation∙Deploying New ApplicationsInstance TuningPart III, "Optimizing Instance Performance" of this guide discusses the factors involved with the tuning and optimizing of an Oracle database instance.When considering instance tuning, care must be taken in the initial design of the database system to avoid bottlenecks that could lead to performance problems. In addition, you need to consider:∙Allocating memory to database structures∙Determining I/O requirements of different parts of the database∙Tuning the operating system for optimal performance of the databaseAfter the database instance has been installed and configured, you need to monitor the database as it is running to check for performance-related problems.Performance PrinciplesPerformance tuning requires a different, although related, method to the initial configuration of a system. Configuring a system involves allocating resources in an ordered manner so that the initial system configuration is functional.Tuning is driven by identifying the most significant bottleneck and making the appropriate changes to reduce or eliminate the effect of that bottleneck. Usually, tuning is performed reactively, either while the system is preproduction or after it is live.BaselinesThe most effective way to tune is to have an established performance baseline that can be used for comparison if a performance issue arises. Most database administrators (DBAs) know their system well and can easily identify peak usage periods. For example, the peak periods could be between 10.00am and 12.00pm and also between 1.30pm and 3.00pm. This could include a batch window of 12.00am midnight to 6am.It is important to identify these high-load times at the site and install a monitoring tool that gathers performance data for those times. Optimally, data gathering should be configured from when the application is in its initial trial phase during the QA cycle. Otherwise, this should be configured when the system is first in production.Ideally, baseline data gathered should include the following:∙Application statistics (transaction volumes, response time)∙Database statistics∙Operating system statistics∙Disk I/O statistics∙Network statisticsIn the Automatic Workload Repository, baselines are identified by a range of snapshots that are preserved for future comparisons. See "Automatic Workload Repository".The Symptoms and the ProblemsA common pitfall in performance tuning is to mistake the symptoms of a problem for the actual problem itself. It is important to recognize that many performance statistics indicate the symptoms, and that identifying the symptom is not sufficient data to implement a remedy. For example:∙Slow physical I/OGenerally, this is caused by poorly-configured disks. However, it could also be caused by a significant amount of unnecessary physical I/O on those disks issued by poorly-tuned SQL.∙Latch contentionRarely is latch contention tunable by reconfiguring the instance.Rather, latch contention usually is resolved through application changes.∙Excessive CPU usageExcessive CPU usage usually means that there is little idle CPU on the system. This could be caused by an inadequately-sized system, by untuned SQL statements, or by inefficient application programs.When to TuneThere are two distinct types of tuning:∙Proactive Monitoring∙Bottleneck EliminationProactive MonitoringProactive monitoring usually occurs on a regularly scheduled interval, where a number of performance statistics are examined to identify whether the system behavior and resource usage has changed. Proactive monitoring also can be called proactive tuning.Usually, monitoring does not result in configuration changes to the system, unless the monitoring exposes a serious problem that is developing. Insome situations, experienced performance engineers can identify potential problems through statistics alone, although accompanying performance degradation is usual.Experimenting with or tweaking a system when there is no apparent performance degradation as a proactive action can be a dangerous activity, resulting in unnecessary performance drops. Tweaking a system should be considered reactive tuning, and the steps for reactive tuning should be followed.Monitoring is usually part of a larger capacity planning exercise, where resource consumption is examined to see the changes in the way the application is being used and the way the application is using the database and host resources.Bottleneck EliminationTuning usually implies fixing a performance problem. However, tuning should be part of the life cycle of an application, through the analysis, design, coding, production, and maintenance stages. Many times, the tuning phase is left until the system is in production. At this time, tuning becomes a reactive fire-fighting exercise, where the most important bottleneck is identified and fixed.Usually, the purpose for tuning is to reduce resource consumption or to reduce the elapsed time for an operation to complete. Either way, the goal is to improve the effective use of a particular resource. In general, performance problems are caused by the over-use of a particular resource. That resource is the bottleneck in the system. There are a number of distinct phases in identifying the bottleneck and the potential fixes. These are discussed in the sections that follow.Remember that the different forms of contention are symptoms that can be fixed by making changes in the following places:∙Changes in the application, or the way the application is used∙Changes in Oracle∙Changes in the host hardware configurationOften, the most effective way of resolving a bottleneck is to change the application.SQL TuningPart IV, "Optimizing SQL Statements"of this guide discusses the process of tuning and optimizing SQL statements.Many client/server application programmers consider SQL a messaging language, because queries are issued and data is returned. However, client tools often generate inefficient SQL statements. Therefore, a good understanding of the database SQL processing engine is necessary for writing optimal SQL. This is especially true for high transaction processing systems.Typically, SQL statements issued by OLTP applications operate on relatively few rows at a time. If an index can point to the exact rows that you want, then Oracle can construct an accurate plan to access those rows efficiently through the shortest possible path. In decision support system (DSS) environments, selectivity is less important, because they often access most of a table's rows. In such situations, full table scans are common, and indexes are not even used. This book is primarily focussed on OLTP-type applications. For detailed information on DSS and mixed environments, see the Oracle Data Warehousing Guide.Query Optimizer and Execution PlansWhen a SQL statement is executed on an Oracle database, the Oracle query optimizer determines the most efficient execution plan after considering many factors related to the objects referenced and the conditions specified in the query. This determination is an important step in the processing of any SQL statement and can greatly affect execution time.During the evaluation process, the query optimizer reviews statistics gathered on the system to determine the best data access path and other considerations. You can override the execution plan of the query optimizer with hints inserted in SQL statement.Introduction to Performance Tuning Features and ToolsEffective data collection and analysis is essential for identifying and correcting performance problems. Oracle provides a number of tools that allow a performance engineer to gather information regarding database performance. In addition to gathering data, Oracle provides tools to monitor performance, diagnose problems, and tune applications.The Oracle gathering and monitoring features are mainly automatic, managed by an Oracle background processes. To enable automatic statistics collection and automatic performance features, the STATISTICS_LEVEL initialization parameter must be set to TYPICAL or ALL. You can administer and display the output of the gathering and tuning tools with Oracle Enterprise Manager or with APIs and views. Oracle Enterprise Manager Database Control is recommended for ease of use.See Also:∙Oracle Database 2 Day DBA for information on monitoring,diagnosing, and tuning the database∙Oracle Enterprise Manager Concepts for information aboutmonitoring and diagnostic tools available with Oracle EnterpriseManager∙PL/SQL Packages and Types Reference for detailed information on theDBMS_ADVISOR, DBMS_SQLTUNE, andDBMS_WORKLOAD_REPOSITORY packages∙Oracle Database Reference for information on theSTATISTICS_LEVEL initialization parameterAutomatic Performance Tuning FeaturesThe Oracle automatic performance tuning features include:∙Automatic Workload Repository (AWR) collects, processes, and maintains performance statistics for problem detection and self-tuning purposes. See "Automatic WorkloadRepository".∙Automatic Database Diagnostic Monitor (ADDM) analyzes the information collected by the AWR for possible performance problems with the Oracle database. See "AutomaticDatabase Diagnostic Monitor".∙SQL Tuning Advisor allows a quick and efficient technique for optimizing SQL statements without modifying any statements. See "SQL Tuning Advisor".∙SQLAccess Advisor provides advice on materialized views, indexes, and materialized view logs. See "SQLAccess Advisor" and Oracle Data Warehousing Guide for information onSQLAccess Advisor.∙End to End Application tracing identifies excessive workloads on the system by specific user, service, or application component. See "End to End Application Tracing".∙Server-generated alerts automatically provide notifications when impending problems are detected. See Oracle Database Administrator's Guide for information aboutmonitoring the operation of the database with server-generated alerts.∙Additional advisors that can be launched from Oracle Enterprise Manager, such as memory advisors to optimize memory for an instance. The memory advisors arecommonly used when automatic memory management is not set up for the database.Other advisors are used to optimize mean time to recovery (MTTR), shrinking ofsegments, and undo tablespace settings. See Oracle Enterprise Manager Concepts forinformation on advisors that are available with Oracle Enterprise Manager.To access the advisors through Oracle Enterprise Manager Database Control:∙Click the Advisor Central link under Related Links at the bottom of the Database pages.∙On the Advisor Central page, you can click one of the advisor links.Oracle Enterprise Manager Performance page displays host, instance service time, and throughput information for real time monitoring and diagnosis. The page can be set to refresh automatically in selected intervals or manually. See Oracle Enterprise Manager Concepts for information on the Performance page available with Oracle Enterprise Manager.Additional Oracle ToolsThis section describes additional Oracle tools that can be used for determining performance problems.V$ Performance ViewsThe V$ views are the performance information sources used by all Oracle performance tuning tools. The V$ views are based on memory structures initialized at instance startup. The memory structures, and the views that represent them, are automatically maintained by Oracle throughout the life of the instance. See Chapter 10, "Instance Tuning Using Performance Views" for information diagnosing tuning problems using theV$ performance views.See Also:Oracle Database Reference for information about dynamicperformance viewsNote:Oracle recommends using the Automatic Workload Repositoryto gather performance data. These tools have been designedto capture all of the data needed for performance analysis.。