Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 123148 - performance defect of snprintf in glibc
performance defect of snprintf in glibc
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: glibc (Show other bugs)
ia64 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
Blocks: 106771 122950
  Show dependency treegraph
Reported: 2004-05-12 22:44 EDT by Yiyang Dai
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-02 01:57:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2004:384 normal SHIPPED_LIVE Updated glibc packages 2004-09-02 00:00:00 EDT

  None (edit)
Description Yiyang Dai 2004-05-12 22:44:02 EDT
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):
KERNEL 2.4.21-15.EL

How reproducible:
a simple testing program
#include "stdio.h"
#include "unistd.h"
#include "sys/time.h"

unsigned int GetTickCount()
        struct timespec tp;
        unsigned int tt;
        tt = tp.tv_sec*1000+tp.tv_nsec/1000000;
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;

        char buf[1024];
        int x=234234;
        unsigned int count1,count2,count3;
        int i;

        for (i=0;i<1000000;i++)


        printf("%u msec used\n",count3);

Steps to Reproduce:
compile with gcc or intel's icc

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 )
Comment 2 Yiyang Dai 2004-05-16 20:39:17 EDT
have tried , about 5x performance improved . when will this be 
mergered to officical release ? U3 ?
Comment 3 Jakub Jelinek 2004-05-17 03:13:43 EDT
Should go into FC3, RHEL3/U3 and RHEL4 b1.
Comment 5 Jakub Jelinek 2004-06-24 15:06:04 EDT
The patch is in glibc-2.3.2-95.21.
Comment 6 Jay Turner 2004-08-20 08:10:02 EDT
Performance with 2.3.2-95.26 is vastly improved.  Moving to modified
and will release as part of the U3 errata.
Comment 7 Jay Turner 2004-09-02 01:57:32 EDT
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.


Note You need to log in before you can comment on or make changes to this bug.