Presentation on theme: "Copyright 2007, Information Builders. Slide 1 Performance and Tuning Mark Nesson, Vashti Ragoonath June 2008."— Presentation transcript:
Copyright 2007, Information Builders. Slide 1 Performance and Tuning Mark Nesson, Vashti Ragoonath June 2008
Copyright 2007, Information Builders. Slide 2 Performance and Tuning Overview Performance Testing Used to eliminate bottlenecks and establish a baseline Should be conducted in a controlled environment Must have a clear set of expectations Number of concurrent users Response times for queries Meet users expectations and Service Level Response times Tuning Repetitive process of: Running tests to identify bottlenecks Tuning one component at a time and redoing tests Increasing load to identify all bottlenecks..until objectives are met
Copyright 2007, Information Builders. Slide 3 Performance and Tuning Overview Bottlenecks can exist at different levels: Application Level Developers can look for inefficiencies in their code Database Level Use query optimizers and database profilers to check for bottlenecks Operating System Level Administrators can use utilities tools like PerfMon on Windows and on UNIX top, vmstat, iostat to track CPU, RAM, Disk Space utilization Network Level Network Administrators can use utilities like netstat, packet sniffers like tcpdump and others like ethereal
Copyright 2007, Information Builders. Slide 4 Performance and Tuning Tuning Components External Tuning Components Operating System Database Server Application Server Java Virtual Machine Network WebFOCUS Tuning Components Application Data Adapters Dialect Specific or Generic Reporting Server Workspace Manager Reporting Server Java Services ReportCaster Distribution Server
Copyright 2007, Information Builders. Slide 5 Performance and Tuning External Tuning Components - OS Operating System Work with the OS Administrators to identify bottlenecks. If the system is maxed out on CPU and RAM use the system utilities to identify which processes are taking up all the resources. Maybe some jobs can be run at off-peak hours or deferred and a lower CPU priority. Check all configuration files to ensure they are in sync with the current releases of installed software. Upgrades may require updates to old configuration files that could improve performance overall on the system. Track usage patterns on the machines to identify problems and failures which can be fixed easily.
Copyright 2007, Information Builders. Slide 6 Performance and Tuning External Tuning Components – Database Database Server Verify that the database optimizer runs as recommended to generate good data statistics. Example: Oracle ANALYZE command creates optimizer statistics to choose methods of fast access to the data. If the statistics were not generated properly, performance will be affected. Fix Indexes. Use EXPLAIN to see what the optimizer does with SQL statements. Does it do a full table scan? Does the table have appropriate indexes for the queries? You may have to rebuild indexes. Spread the Database Over Disks and I/O Channels. e.g: Partition tables and indexes over multiple disks
Copyright 2007, Information Builders. Slide 7 Performance and Tuning External Tuning Components – App Server Disable Auto-deployment Use Pre-compiled JavaServer Pages Disable Dynamic Application Reloading Tune Thread Pool Initial Thread Pool size Minimum number of threads in pool Maximum Thread Pool size Maximum number of concurrent threads in pool Thread inactivity timeout Time spent waiting for client response before being returned to pool Growable thread pool Number of threads the pool should increase by when its maxed out
Copyright 2007, Information Builders. Slide 8 Performance and Tuning External Tuning Components – JVM Java Virtual Machine (JVM) Tune Heap Size so garbage collection time is minimized and clients can still be processed. Initial Heap Size Maximum Heap Size Garbage Collection Use the -verbosegc option to track frequency and times of garbage collection
Copyright 2007, Information Builders. Slide 9 Performance and Tuning External Tuning Components – Network Network Network administrators will be able to identify and tune bottlenecks are with the use of: packet sniffers such as tcpdump network protocol analyzers such as ethereal utilities such as netstat, ping, traceroute and others
Copyright 2007, Information Builders. Slide 10 Performance and Tuning Demo: JVM Tuning Lets see a live demo of tuning the Tomcat thread pool Test Case 1 – Low thread pool Tomcat parameters: Low thread pool(15), 256MB Heap size, 25 concurrent users, request sleeps for 15 secs, 100 available tscom agents Capture baseline performance statistics Tune the Tomcat JVM: Large thread pool(75), 256MB Heap size, 25 concurrent users, request sleeps for 15 secs, 100 available tscom agents Capture performance statistics Response times improved by a little less than 50%!
Copyright 2007, Information Builders. Slide 11 Performance and Tuning WebFOCUS Tuning Components – Application Application Verify that requests are generating optimized SQL Enforcing all RDBMS efficiencies Data Adapters Enable OPTIMIZATION flags ( SET OPTIMIZATION) Fetch data in larger blocks (SET FETCHSIZE) Set ISOLATION Level RU (Read Uncommitted) There are many more documented in the Data Adapters Manuals
Copyright 2007, Information Builders. Slide 12 Performance and Tuning Tuning Components –Reporting Server Workspace Manager -Data Services maximum number_ready deployment * private connection_pooling Queuing idle_session_limit idle_agent_limit cpu_limit memory_limit connection_limit max_connections_per_user * agent_refresh sched_priority
Copyright 2007, Information Builders. Slide 13 Performance and Tuning Tuning Components –Java Services Workspace Manager –Configuration Java Services Most commonly used to: Rendering graphical images on the Reporting Server With the JDBC Adapter Tuning Parameters Initial Java Heap Size Maximum Java Heap Size Java Thread Stack Size JVM_OPTIONS Specify other performance type options
Copyright 2007, Information Builders. Slide 14 Performance and Tuning Demo: Graph Processing Lets see a live demo of how Java Services is used for processing graphs. JSCOM Listener under Java Services Can have a cluster of JSCOM Listeners Graph request generates 25 images in the report. Using the default JSCOM Listener we will run 25 concurrent users and look at the response time. We then add a second JSCOM Listener and rerun our test. Is there an improvement in the response times? Yes there is…
Copyright 2007, Information Builders. Slide 15 Performance and Tuning Tuning Components –ReportCaster ReportCaster Configuration General Tab Maximum Threads Data Server (NODE) Maximum Connections Data Server (CLUSTER) Weight Maximum Connection Algorithm to determine which server to send request to: Weight * maximum connection = priority Request will be routed to server with highest priority
Copyright 2007, Information Builders. Slide 16 Performance and Tuning Demo: ReportCaster Compression Lets see a live demo of how we can have a scalable distribution server by using ReportCaster compression. Run request with embedded graphical images and distribute in uncompressed PDF format to Report Library. Check to see what the original file size is in the BOTLIB table and make sure it was not flagged as compressed in the BOTSCHED table. Column AUDITOR in table BOTSCHED has a flag to indicate if data is compressed. Column REPORTSIZE in table BOTLIB has file size before compression. Column LIBFIELD1 in table BOTLIB has compressed file size. Clone and schedule the same request and distribute in compressed PDF format to Report Library. Check the file sizes. View both reports from Report Library
Copyright 2007, Information Builders. Slide 17 Performance and Tuning Demo: ReportCaster Compression You can distribute the same report via EMAIL and use the ZIP option to minimize space allocation. You can also ZIP and distribute Active Reports for your users and they can slice and dice that data without being connected. We now have Active Reports in Connected mode but more details in another presentation that we will be doing.
Copyright 2007, Information Builders. Slide 18 Performance and Tuning Conclusion Questions and Comments.