Description of problem: compare to RH AS 2.1 the performance of snprintf is really unacceptable in RHEL3(RHEL-U2 has the same problem) Version-Release number of selected component (if applicable): RHEL3 U2 KERNEL 2.4.21-15.EL glibc-2.3.2-95.20 How reproducible: a simple testing program ---------------sprintf.c------------------- #include "stdio.h" #include "unistd.h" #include "sys/time.h" unsigned int GetTickCount() { struct timespec tp; unsigned int tt; clock_gettime(&tp); tt = tp.tv_sec*1000+tp.tv_nsec/1000000; return(tt); } int clock_gettime( struct timespec *tp) { struct timeval tv; gettimeofday(&tv, NULL); tp->tv_sec = tv.tv_sec; tp->tv_nsec = tv.tv_usec*1000; return 0; } main(){ char buf[1024]; int x=234234; unsigned int count1,count2,count3; int i; count1=GetTickCount(); for (i=0;i<1000000;i++) sprintf (buf,"sfsdfasdfasdfasdfas;ja;sdjf;lakjsdfkasfkasasdofas;fw.nxzvohpowsy erqnwoirhasknfasdfhoaudfoizxcvnfasdfasfasdfasdfasdfasdf%d",x); count2=GetTickCount(); count3=count2-count1; printf("%u msec used\n",count3); } ---------------sprintf.c------------------- Steps to Reproduce: compile with gcc or intel's icc results: on RH AS 2.1 the result is 1395 msec but on RHEL3 & RHEL3-U2 the result is 5243 msec on RH AS 2.1 if compile the testing code with -static ( static link the glibc-2.2.4-29.2 ) , and move the binary to RHEL3 , the result will be 1385 msec which seems ok. Additional info: both RH AS2.1 & RHEL3(RHEL3-U2) running on hp rx26000 (2x1.5GHz Itanium2 )
http://sources.redhat.com/ml/libc-hacker/2004-05/msg00026.html
have tried , about 5x performance improved . when will this be mergered to officical release ? U3 ?
Should go into FC3, RHEL3/U3 and RHEL4 b1.
The patch is in glibc-2.3.2-95.21.
Performance with 2.3.2-95.26 is vastly improved. Moving to modified and will release as part of the U3 errata.
An errata has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2004-384.html