A fix is available
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
IV56964
Reported component name
AIX V7.1
Reported component ID
5765H4000
Reported release
710
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Submitted date
2014-03-20
Closed date
2014-03-20
Last modified date
2014-08-14
APAR is sysrouted FROM one or more of the following:
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 U859635
UP14/08/11 I 1000
PTF to Fileset Mapping
U859635 bos.rte.commands 7.1.2.18
[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSMV87","label":"AIX 6.1 Enterprise Edition"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"710","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSMVAX","label":"AIX Express Edition"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"710","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG11R","label":"AIX 7.1 HIPERS, APARs and Fixes"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"710","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
14 August 2014