IBM Support

IV52789: SORT PERFORMANCE POOR WITH -K FLAG APPLIES TO AIX 7100-03

A fix is available

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • When using the -k flag of the sort command in addition
    to the -A flag, LANG=C, or LANG=POSIX,  performance of
     the sort command may be poor. tprof data gathered
    during execution of the command will show time being
    spent in the skip() function of sort and the mbtowc()
    function of libc.a.
    
    The -A flag forces LANG=C. Removing this flag will
    improve performance. Similarly, if the system uses
    LANG=C or LANG=POSIX, switching it to a locale such as?
    LANG=en_US will show an increase in performance. For
    example, with and without the -A flag:
    
    # time sort -T . -A -k1.2686,1.2783d file_to_sort >
        output
    
    real??? 3m37.89s
    user??? 2m9.24s
    sys???? 0m5.10s
    
    # time sort -T . -k1.2686,1.2783d file_to_sort > output
    real??? 0m34.95s
    user??? 0m14.21s
    sys???? 0m5.24s
    

Local fix

  • If using LANG=C or LANG=POSIX, switch to en_US or another
    single-byte locale for increased performance. If using
    the -A flag, performance will increase without that flag.
    

Problem summary

  • SORT PERFORMANCE POOR WITH -K and -A FLAG
    

Problem conclusion

  • added a if check to avoid unnecessary call to libc function
    

Temporary fix

Comments

  • 6100-07 - use AIX APAR IV51164
    6100-08 - use AIX APAR IV57818
    6100-09 - use AIX APAR IV51897
    6100-09 - use AIX APAR IV51897
    6100-09 - use AIX APAR IV51897
    7100-01 - use AIX APAR IV57512
    7100-02 - use AIX APAR IV56964
    7100-03 - use AIX APAR IV52789
    

APAR Information

  • APAR number

    IV52789

  • Reported component name

    AIX V7.1

  • Reported component ID

    5765H4000

  • Reported release

    710

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Submitted date

    2013-12-02

  • Closed date

    2013-12-02

  • Last modified date

    2014-08-14

  • APAR is sysrouted FROM one or more of the following:

    IV51164

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    AIX V7.1

  • Fixed component ID

    5765H4000

Applicable component levels

  • R710 PSY U859454

       UP14/05/22 I 1000

PTF to Fileset Mapping



Document information

More support for: AIX Enterprise Edition

Software version: 710

Operating system(s): AIX

Reference #: IV52789

Modified date: 14 August 2014