Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-26614

Do not round up buffer sizes when receiving Messages

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.4.0-rc1
    • Networking
    • Fully Compatible
    • Platforms 2016-10-31

    Description

      The MessagePort::recv class rounds up the size of the buffer it uses to hold a message coming off the network.

      There is no good reason to do so, and some reasons to actively not do so, since:

      • TCMalloc already groups allocations into size buckets
      • The extra allocation wastes 0.5kb on average for each server operation in progress
      • ASAN and other tools will see the extra bytes as valid to access, even though they contain garbage data, potentially masking bugs.

      We should remove the rounding.

      Attachments

        Activity

          People

            andrew.morrow@mongodb.com Andrew Morrow
            andrew.morrow@mongodb.com Andrew Morrow
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: