This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nss/22078] New: nss_files performance issue in multi mode


https://sourceware.org/bugzilla/show_bug.cgi?id=22078

            Bug ID: 22078
           Summary: nss_files performance issue in multi mode
           Product: glibc
           Version: 2.26
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nss
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
  Target Milestone: ---

nss_files, when finding additional addresses in multi mode for gethostbyname,
processes these addresses very inefficiently and needs a huge buffer as a
result.

For example, 64K addresses need a buffer size of more than 16 GiB (in fact, my
test allocates 32 GiB of memory).

This happens because for each new address, the entire array of the addresses
seen so far is copied into a fresh, enlarged array allocated from the buffer. 
Overall buffer usage is thus super-linear.

The processing of aliases appears to be affected in a similar way.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]