Tips n-tricks to improve performance and reduce disk space

1,696 views

Published on

COMMON Europe Congress 2012 - Vienna

Published in: Technology
2 Comments
0 Likes
Statistics
Notes
  • Be the first to like this

No Downloads
Views
Total views
1,696
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
62
Comments
2
Likes
0
Embeds 0
No embeds

No notes for slide

Tips n-tricks to improve performance and reduce disk space

  1. 1. Tips and Tricks to improve system performance and save disk space.Pete MassielloiTech Solutionspmassiello@itechsol.com203-744-7854iTech Solutions because IBM i (AS/400s) don’t come with System Administrators 0
  2. 2. In this sessionIn this presentation we will discuss the ways to clean up our diskspace, and what you can do to improve performance. While theIBM i may manage itself in some areas, there are manyoptimization and cleanup techniques that are part of IBM i, yetmost shops don’t spend the time and effort to implement them. Wewill learn the “tricks” that can help you reduce your disk I/O,reduce disk utilization, reduce memory faulting, and improvesystem performance. Copyright iTech Solutions 1
  3. 3. What We’ll Cover … • Performance Terms and Problems • Physical Files • Logical Files • Programs • Other Objects • Performance and Expert Cache • Basic Cleanup and Why • Save Files, Reclaim Storage, and Spool Files • DISKTASKs • What to do Tomorrow • Wrap-up Copyright iTech Solutions 2
  4. 4. What We’ll Cover … • Performance Terms and Problems • Physical Files • Logical Files • Programs • Other Objects • Performance and Expert Cache • Basic Cleanup and Why • Save Files, Reclaim Storage, and Spool Files • DISKTASKs • What to do Tomorrow • Wrap-up Copyright iTech Solutions 3
  5. 5. Is This Where to Start Performance Tuning? Performance tools Automatic Mirroring Performance Adjustment Batch Throughput Management Activity LevelsTimeslice Optimization Copyright iTech Solutions 4
  6. 6. Identifying the ProblemDownforce ?! Turbo Pressure IBM 720 Tire Selection Damper settings Copyright iTech Solutions 5
  7. 7. Identifying the Problem (cont.) IBM 720 What Performance can you expect? Copyright iTech Solutions 6
  8. 8. Why We Should Be CleaningHidden costs. “Having a lot of storage is like having children. It can costyou almost nothing to have a child, but the upkeep costs a lot. Infact, Aberdeen’s research and other people’s research show thatthere can be an order of magnitude difference between the cost toacquire the storage and the cost to maintain it.” Dan Tanner Analyst with Aberdeen Group Copyright iTech Solutions 7
  9. 9. What We Will Discuss Removing Excess Baggage Optimization Tuning Copyright iTech Solutions 8
  10. 10. What We’ll Cover … • Performance Terms and Problems • Physical Files • Logical Files • Programs • Other Objects • Performance and Expert Cache • Basic Cleanup and Why • Save Files, Reclaim Storage, and Spool Files • DISKTASKs • What to do Tomorrow • Wrap-up Copyright iTech Solutions 9
  11. 11. Generate List of Files Copyright iTech Solutions 10
  12. 12. Create Query • Select input file as yourlib/DSPFDPF • Select these fields: MBLIB, MBFILE, MBNAME, MBNRCD, MBNDTR, MBDSZ2 • Sort by MBDSZ2 Descending • Select records by: MBNDTR GT 0 and MBFILE NLIKE QADB% Copyright iTech Solutions 11
  13. 13. List to Work On Copyright iTech Solutions 12
  14. 14. Physical Files • Size • Reorganize (normal and while active*) • Blocking • Resequence • Purge & Archive • 3rd Party Software Copyright iTech Solutions 13
  15. 15. RGZPFM All Records are stored in pages. Think of a page as a chess board containing: Deleted records Active records Copyright iTech Solutions 14
  16. 16. RGZPFM (cont.) Copyright iTech Solutions 15
  17. 17. The Old Way Copyright iTech Solutions 16
  18. 18. Reorganize While Active Requires file to be journaled. And, let’s discuss the LOCK Parameter. Copyright iTech Solutions 17
  19. 19. Locked, Others Can Read Copyright iTech Solutions 18
  20. 20. Physical Files • Size • Reorganize • Blocking • Resequence • Purge & Archive • 3rd Party Software Copyright iTech Solutions 19
  21. 21. What We’ll Cover … • Performance Terms and Problems • Physical Files • Logical Files • Programs • Other Objects • Performance and Expert Cache • Basic Cleanup and Why • Save Files, Reclaim Storage, and Spool Files • DISKTASKs • What to do Tomorrow • Wrap-up Copyright iTech Solutions 20
  22. 22. Logical Files • Size • Sharing • Performance • Maintenance Level • Onetime Fixes • 3rd Party Software Copyright iTech Solutions 21
  23. 23. Sharing Access Paths Copyright iTech Solutions 22
  24. 24. Sharing Example • Sales Physical File • Logical File A  Keyed by Country • Logical File B  Key by Country, State Copyright iTech Solutions 23
  25. 25. Logical Files • Size • Sharing • Performance • Maintenance Level • Onetime Fixes • 3rd Party Software Copyright iTech Solutions 24
  26. 26. What We’ll Cover … • Performance Terms and Problems • Physical Files • Logical Files • Programs • Other Objects • Performance and Expert Cache • Basic Cleanup and Why • Save Files, Reclaim Storage, and Spool Files • DISKTASKs • What to do Tomorrow • Wrap-up Copyright iTech Solutions 25
  27. 27. Programs • Symbol Table • V5R1 Observability & Creation Data • V6R1 Migrations  Analyze Object Convert - ANZOBJCVN • Types of Compression • Optimization • Usage Copyright iTech Solutions 26
  28. 28. What We’ll Cover … • Performance Terms and Problems • Physical Files • Logical Files • Programs • Other Objects • Performance and Expert Cache • Basic Cleanup and Why • Save Files, Reclaim Storage, and Spool Files • DISKTASKs • What to do Tomorrow • Wrap-up Copyright iTech Solutions 27
  29. 29. Removing Excess Baggage — Other Objects • Device Files • Menus • Panel Groups • Source Files • Spool Files Copyright iTech Solutions 28
  30. 30. Removing Excess Baggage — Other Ways • Temporary & Spool Storage – RCLTMPSTG & RCLSPLSTG • IFS • Reclaim Storage – RCLSTG *ALL | *DBXREF | *DIR • Resizing of Objects • History Logs, Spool Files, Journal Rcvrs Copyright iTech Solutions 29
  31. 31. What We’ll Cover … • Performance Terms and Problems • Physical Files • Logical Files • Programs • Other Objects • Performance and Expert Cache • Basic Cleanup and Why • Save Files, Reclaim Storage, and Spool Files • DISKTASKs • What to do Tomorrow • Wrap-up Copyright iTech Solutions 30
  32. 32. Performance — Expert Cache • Part of IBM i • Look ahead cache • Used only with Shared Pools • *CALC Paging Option • CHGSBSD to use Shared Pools • WRKSHRPOOL Copyright iTech Solutions 31
  33. 33. WRKSHRPOOL How to Activate Copyright iTech Solutions 32
  34. 34. WRKSHRPOOL (cont.) Minimum Sizes are not correct for your machine Copyright iTech Solutions 33
  35. 35. Performance • QPFRADJ  0 No Adjustment  1 Adjustment at IPL  2 Adjustment at IPL & Automatically  3 Automatically Copyright iTech Solutions 34
  36. 36. General Performance • Queries • Indexes • Backups • Balanced Disks – STRASPBAL Copyright iTech Solutions 35
  37. 37. What We’ll Cover … • Performance Terms and Problems • Physical Files • Logical Files • Programs • Other Objects • Performance and Expert Cache • Basic Cleanup and Why • Save Files, Reclaim Storage, and Spool Files • DISKTASKs • What to do Tomorrow • Wrap-up Copyright iTech Solutions 36
  38. 38. Why We Should Be Cleaning • Backups • Performance • Recovery Copyright iTech Solutions 37
  39. 39. Automation Copyright iTech Solutions 38
  40. 40. Automation (cont.) Copyright iTech Solutions 39
  41. 41. Cleanup • User MSGQs when not signed on • QSYSOPR under System & WS • Only QEZDEBUG & QEZJOBLOG • System Journals (See next slide for names) • History Log, Problem Logs, some temporary PTF objects, and Alert DB Copyright iTech Solutions 40
  42. 42. System Journals Cleaned • QAOSDIAJRN Journal for DIA files. • QDSNX Journal for DSNX logs. • QSNADS Journal for SNADS files. • QSNMP Journal for SNMP. • QSXJRN Journal for problem databases. • QLYJRN Journal for Application Development Manager transactions. • QPFRADJ Journal for performance adjustment data. • QX400 Journal for OSI Message Services. • QCQJMJRN Journal for Managed System Services. • QO1JRN Journal for Application Enabler OFC files. • ADJRNLO Journal for application program driver files. • QLYPRJLOG Journal for project logs. • QMAJRN Journal for order assistance requests. • QZMF Journal for mail server framework log. • QVPN Journal for Virtual Private Networking. • QZCAJRN Journal for the SNMP database. • QACGJRN Journal for job accounting data. Copyright iTech Solutions 41
  43. 43. Verify Cleanup Is Cleaning Copyright iTech Solutions 42
  44. 44. PTFs Copyright iTech Solutions 43
  45. 45. Permanently Apply PTFs When a PTF is applied, it completely replaces the affected objects in the product. PTFs can be applied temporarily or permanently. If they are applied temporarily, the replaced objects are saved by the system and can later be restored to the product by the Remove Program Temporary Fix (RMVPTF) command. If PTFs are applied permanently, the replaced objects are deleted from the system. Copyright iTech Solutions 44
  46. 46. PTFs You Have Downloaded• Have cover letters stored as members in QGPL/QAPZCOVER• Save Files in QGPL  QMF*  QSI*  QSF*• Use DLTPTF 45
  47. 47. DLTPTF Copyright iTech Solutions 46
  48. 48. Licensed Programs You Are NOT Using • Careful • Never delete the library, always use DLTLICPGM
  49. 49. Remove Old Main Storage Dumps • STRSST & signon • Select option 1. Start a Service Tool • Select option 6. Main Storage Dump Manager • Select option 2. Work with copies of MSD 48
  50. 50. Old Performance Data Copyright iTech Solutions 49
  51. 51. What We’ll Cover … • Performance Terms and Problems • Physical Files • Logical Files • Programs • Other Objects • Performance and Expert Cache • Basic Cleanup and Why • Save Files, Reclaim Storage, and Spool Files • DISKTASKs • What to do Tomorrow • Wrap-up Copyright iTech Solutions 50
  52. 52. Save Files • Can be a big payoff, BUT … • You need to decide which ones to keep and which ones to delete. • Find out Date last used, Date when created, and by what UserID. • Don’t delete any of them in Q libraries. • DSPSAVF to help you decide. • Backup to Special Tape before delete. Copyright iTech Solutions 51
  53. 53. Generate List of Files on the System Copyright iTech Solutions 52
  54. 54. Create Query • Select input file as yourlib/DSPSAVFS • Select these fields: ODLBNM, ODOBNM, ODOBSZ, ODOBOW, ODLDAT , ODUDAT • Sort by ODOBSZ Descending • Select records by: ODOBAT EQ SAVF Copyright iTech Solutions 53
  55. 55. List of Save Files Copyright iTech Solutions 54
  56. 56. Libraries• Programmers who have left• Old Libraries• Backup Libraries• WRKLIB *ALL Copyright iTech Solutions 2007 55
  57. 57. Old Journal Receivers • DSPOBJD OBJ(*ALL/*ALL) OBJTYPE(*JRNRCV) • Ones people forgot about and they just grow. • Sequence number jump. 56
  58. 58. Reclaim Storage
  59. 59. More on Reclaims • After RCLSTG look in library QRCL and directory QReclaim • Subcomponents of RCLSTG  RCLLNK OBJ(/)  RCLDBXREF (*CHECK or *FIX)  RCLOBJOWN USRPRF( )  RCLDLO DLO(*ALL)  RCLLIB LIB( )  RCLSPLSTG DAYS(1) • RCLTMPSTG LIB(*ALL) DAYS(1) Copyright iTech Solutions 58
  60. 60. Delete Expired Spool Files Since V5R4 Copyright iTech Solutions 59
  61. 61. Set Spool Files to Expire Copyright iTech Solutions 60
  62. 62. What We’ll Cover … • Performance Terms and Problems • Physical Files • Logical Files • Programs • Other Objects • Performance and Expert Cache • Basic Cleanup and Why • Save Files, Reclaim Storage, and Spool Files • DISKTASKs • What to do Tomorrow • Wrap-up Copyright iTech Solutions 61
  63. 63. Collect Disk Information • You can run RTVDSKINF to Collect Disk Information, or you can use the DISKTASKs Menu. • You will want to run the RTVDSKINF command in Batch. • Using the DISKTASKs menu, you can select option 1 to automate the collection of the RTVDSKINF information on a selected interval (Daily, Weekly, or monthly). Copyright iTech Solutions 62
  64. 64. GO DISKTASKS Copyright iTech Solutions 63
  65. 65. Collect Disk Information Copyright iTech Solutions 64
  66. 66. Print Disk Information Copyright iTech Solutions 65
  67. 67. System Level Copyright iTech Solutions 66
  68. 68. Library Level Copyright iTech Solutions 67
  69. 69. Objects in QSYS Larger Than 1 MB Copyright iTech Solutions 68
  70. 70. Report on QSYS Copyright iTech Solutions 69
  71. 71. All Files Over 100 MB Copyright iTech Solutions 70
  72. 72. All Files Over 100 MB (cont.) Copyright iTech Solutions 71
  73. 73. Folders Not the IFS Copyright iTech Solutions 72
  74. 74. Get the Directory Information • The Retrieve Directory Information (RTVDIRINF) command is used to collect attributes for directories and files in the Integrated File System. The collected information is stored in database files that are named using the information file prefix specified by the INFFILEPFX parameter. The files are created in the library specified by the INFLIB parameter, defaults to QUSRSYS. • You will want to run this in batch. • You can run the Print Directory Information (PRTDIRINF) command to print reports using the retrieved directory information. Copyright iTech Solutions 73
  75. 75. Get the Directory Information (cont.) Copyright iTech Solutions 74
  76. 76. Print Directory Information Copyright iTech Solutions 75
  77. 77. Directory: Size, Number, Subdirectories Copyright iTech Solutions 76
  78. 78. What We’ll Cover … • Performance Terms and Problems • Physical Files • Logical Files • Programs • Other Objects • Performance and Expert Cache • Basic Cleanup and Why • Save Files, Reclaim Storage, and Spool Files • DISKTASKs • What to do Tomorrow • Wrap-up Copyright iTech Solutions 77
  79. 79. Don’t Let Fear, Uncertainty, and Doubt (FUD) Stop You! It cant be true! You cant do it safely? What does IBM think? What will my BP think? Recovery implications? What are the alternatives? Copyright iTech Solutions 78
  80. 80. Where to Start Optimization – CHGPGMPrograms Symbol Tables - CPROBJ Compression *ALL | *OBJ Reorganize - RGZPFMPhysical Files Resequence - keyfile(name) Purge, Purge, Purge Logical Files Access Path Sharing Access Path Maintenance - CHGLF Copyright iTech Solutions 79
  81. 81. Where to Start (cont.) Compress - CPROBJObjects Delete ARCHIVE!!! ClearObject Logs Spool Members Journals Reclaim StorageTypes Queues Online Education Oversized Objects Copyright iTech Solutions 80
  82. 82. What We’ll Cover … • Performance Terms and Problems • Physical Files • Logical Files • Programs • Other Objects • Performance and Expert Cache • Basic Cleanup and Why • Save Files, Reclaim Storage, and Spool Files • DISKTASKs • What to do Tomorrow • Wrap-up Copyright iTech Solutions 81
  83. 83. 7 Key Points to Take Home• Generate a list of files on your system using the DSPFD on slide 10, and then select the largest files with deleted records as the SQL/Query criteria on slide 11. You have your files with the most deleted records, now we know which files need to be reorganized.• When reorganizing files, don’t forget that the ALWCANCEL(*YES) provides the reorganize while active function.• Figure out which logical files can be shared by examining the keys of the logical files and creating the superset keys first and the subset keys last. Copyright iTech Solutions 82
  84. 84. 7 Key Points to Take Home (cont.)• Use Expert Cache to have the next records in memory before you use them, by changing the paging option of the memory pool to *CALC.• Save files are always big disk hogs; use the procedures on slides 52 and 53 to identify your culprits.• Automate the collection of object information by setting up weekly disk collections.• Run Reclaim Storage every 6 months to find damaged objects, identify offend objects, and reorganize the QADB* files in QSYS.
  85. 85. Your Turn! How to contact me: Pete Massiello Email: pmassiello@itechsol.com Twitter: PeteM59

×