Patch Name: PHKL_21678 Patch Description: s700_800 11.00 Disk sort algorithm fix for slow io response Creation Date: 00/06/01 Post Date: 00/06/13 Hardware Platforms - OS Releases: s700: 11.00 s800: 11.00 Products: N/A Filesets: OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP OS-Core.KERN2-RUN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP OS-Core.KERN2-RUN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP Automatic Reboot?: Yes Status: General Release Critical: No Category Tags: defect_repair enhancement general_release Path Name: /hp-ux_patches/s700_800/11.X/PHKL_21678 Symptoms: PHKL_21678: (SR: 8606128267 Chart: JAGac79067) The system sometimes takes a very long time to respond to a disk read/write request (could be up to several hundred seconds) while it is busy processing other I/O requests on the same disk, especially when there are sequential file accesses going on. Defect Description: PHKL_21678: (SR: 8606128267 Chart: JAGac79067) This is a fairness problem with the disk sort algorithm. The disk sort algorithm is used to reduce the disk head retractions. With this algorithm, all I/O requests with the same priority are queued in non-descending order of disk block number before being processed if the queue is not empty. When requests come in faster than they can be processed, the queue becomes longer, the time needed to perform one scan (from smallest block number to largest block number of the disk) could be very long in the worst case scenarios. It is unfair for the request which came in early but has been continuously pushed back to the end of the queue because it has a large block number or it just missed the current scan. These kind of unlucky requests could line up in the queue for as long as the time needed for processing a whole scan (which could take a few minutes). This situation usually happens when a process tries to access a disk while another process is performing sequential accesses to the same disk. Resolution: To prevent this problem from happening, we have to take the time aspect into consideration in the sorting algorithm. We add a time stamp for each request when it is enqueued, which is used as the second sorting key for the queue (1st key: process priority; 2nd key: enqueued time; 3rd key: block number). The granularity of the time stamp value is controlled by a new tunable "disksort_seconds". If we set "disksort_seconds" to N (N>0), for all the requests with the same priority, we can guarantee that any given request will be processed earlier than those which come in N seconds later than this request. Within each N second period (requests have the same time stamp), all requests are sorted by non-descending block number order. By choosing the right "disksort_seconds" value, we can balance the maximum waiting time of requests and the efficiency of disk accesses. The tunable parameter can be set to 0, 1, 2, 4, 8, 16, 32, 64, 128 or 256 second(s). If "disksort_seconds" is 0 (default value), the time stamp is disabled, which means that time aspect is not taking effect. SR: 8606128267 Patch Files: OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP: /usr/conf/lib/libhp-ux.a(ufs_dsort.o) OS-Core.KERN2-RUN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP: /usr/conf/master.d/fs-tune /usr/conf/space.h.d/fs-tune.h OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP: /usr/conf/lib/libhp-ux.a(ufs_dsort.o) OS-Core.KERN2-RUN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP: /usr/conf/master.d/fs-tune /usr/conf/space.h.d/fs-tune.h what(1) Output: OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP: /usr/conf/lib/libhp-ux.a(ufs_dsort.o): ufs_dsort.c $Date: 2000/05/30 12:35:51 $Revision: r1 1ros/4 PATCH_11.00 (PHKL_21678) OS-Core.KERN2-RUN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP: /usr/conf/master.d/fs-tune: fs-tune $Date: 2000/05/30 12:39:14 $Revision: r11ros /6 PATCH_11.00 (PHKL_21678) /usr/conf/space.h.d/fs-tune.h: fs-tune.h $Date: 2000/05/30 12:42:01 $Revision: r11r os/8 PATCH_11.00 (PHKL_21678) OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP: /usr/conf/lib/libhp-ux.a(ufs_dsort.o): ufs_dsort.c $Date: 2000/05/30 12:35:51 $Revision: r1 1ros/4 PATCH_11.00 (PHKL_21678) OS-Core.KERN2-RUN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP: /usr/conf/master.d/fs-tune: fs-tune $Date: 2000/05/30 12:40:56 $Revision: r11ros /6 PATCH_11.00 (PHKL_21678) /usr/conf/space.h.d/fs-tune.h: fs-tune.h $Date: 2000/05/30 12:43:52 $Revision: r11r os/8 PATCH_11.00 (PHKL_21678) cksum(1) Output: OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP: 4208342755 13188 /usr/conf/lib/libhp-ux.a(ufs_dsort.o) OS-Core.KERN2-RUN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP: 3549857995 1043 /usr/conf/master.d/fs-tune 400004098 1785 /usr/conf/space.h.d/fs-tune.h OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP: 187362101 27272 /usr/conf/lib/libhp-ux.a(ufs_dsort.o) OS-Core.KERN2-RUN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP: 2074134852 1043 /usr/conf/master.d/fs-tune 204305236 1785 /usr/conf/space.h.d/fs-tune.h Patch Conflicts: None Patch Dependencies: s700: 11.00: PHKL_18543 s800: 11.00: PHKL_18543 Hardware Dependencies: None Other Dependencies: None Supersedes: None Equivalent Patches: None Patch Package Size: 90 KBytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or your Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitation of liability and warranties, before installing this patch. ------------------------------------------------------------ 1. Back up your system before installing a patch. 2. Login as root. 3. Copy the patch to the /tmp directory. 4. Move to the /tmp directory and unshar the patch: cd /tmp sh PHKL_21678 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHKL_21678.depot By default swinstall will archive the original software in /var/adm/sw/save/PHKL_21678. If you do not wish to retain a copy of the original software, use the patch_save_files option: swinstall -x autoreboot=true -x patch_match_target=true \ -x patch_save_files=false -s /tmp/PHKL_21678.depot WARNING: If patch_save_files is false when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. For future reference, the contents of the PHKL_21678.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHKL_21678.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHKL_21678.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: This patch depends on base patch PHKL_18543. For successful installation please insure that PHKL_18543 is already installed, or that PHKL_18543 is included in the same depot with this patch and PHKL_18543 is selected for installation.