sort…
August 9, 2009 9:35 pm GMT-0700 | In TechI recently noticed CentOS 5.3’s sort
is way slower than Ubuntu 9.04’s. Apparently the i18n patch used in coreutils-5.97 CentOS rpm is a performance killer:
$ LANG=C time -p sort --buffer-size=128M -n -k1 -k2 test.info > /dev/null real 92.58 user 86.04 sys 6.52 $ time -p sort --buffer-size=128M -n -k1 -k2 test.info > /dev/null real 463.04 user 456.01 sys 6.64
P.S. grep
and other locale sensitive utilities have similar issue.
BTW, if your disk is slow, --buffer-size
is a parameter you might want to play with to optimize performance. By default sort
uses very conservative buffer size while your seemingly used memory is actually just used for cache. [ref]
1 Comment »
RSS feed for comments on this post.
Leave a comment
This weblog is licensed under a Creative Commons License.
Powered by WordPress. Theme based on Pool by Borja Fernandez.
I have a server running RHEL and do a daily sort job, I think I should compile a coreutils and see…
Comment by fishy — August 9, 2009 10:25 pm GMT-0700 #