Evan Martin (evan) wrote in evan_tech,
Evan Martin
evan
evan_tech

tcmalloc

Wikipedia using tcmalloc:
[...] Quite a few problems resulted in memory leaks, but one was particularly nasty: Squid processes under high load started leaking CPU cycles somewhere. After deploying profiling for squid we actually ended up seeing that the problem is inside libc. Once we started profiling libc, one of initial assumptions appeared to be true - our heap was awfully fragmented, slowing down malloc().

Here comes our steroids part: Google has developed a drop-in malloc replacement, tcmalloc, that is really efficient. Space efficient, cpu efficient, lock efficient. This is probably mostly used (and sophisticated) libc function, that was suffering performance issues not that many people wanted to actually tackle. The description sounded really nice, so we ended up using it for our suffering Squids.

The results were what we expected - awesome :)
The tcmalloc documentation is pretty detailed in describing how it works, too.
Tags: go read
Subscribe

  • flipped bits

    % bdiff /mnt/disk1/large_file /mnt/disk2/same_large_file diffing: [........................................] offset diff 346360387: 01011111 :…

  • yep, it's toast / wait, no it's not

    It wasn't the USB enclosure. Error 47 occurred at disk power-on lifetime: 2330 hours (97 days + 2 hours) Model Family: Seagate Barracuda 7200.7…

  • my "final destination" reference was prescient

    When I last discussed my disk problems, I had finally managed to recover my data though there was an ominous noise from my new disk. In the…

  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 28 comments

  • flipped bits

    % bdiff /mnt/disk1/large_file /mnt/disk2/same_large_file diffing: [........................................] offset diff 346360387: 01011111 :…

  • yep, it's toast / wait, no it's not

    It wasn't the USB enclosure. Error 47 occurred at disk power-on lifetime: 2330 hours (97 days + 2 hours) Model Family: Seagate Barracuda 7200.7…

  • my "final destination" reference was prescient

    When I last discussed my disk problems, I had finally managed to recover my data though there was an ominous noise from my new disk. In the…