Skip to content

Add jemalloc and tcmalloc to the image build.#5444

Merged
sougou merged 1 commit intovitessio:masterfrom
planetscale:jacques_malloc
Nov 25, 2019
Merged

Add jemalloc and tcmalloc to the image build.#5444
sougou merged 1 commit intovitessio:masterfrom
planetscale:jacques_malloc

Conversation

@aquarapid
Copy link
Copy Markdown
Contributor

Not used by default. To use:

  • Set LD_PRELOAD=/usr/lib/libtcmalloc_minimal.so.4
  • or LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1
    in your container startup environment.

Signed-off-by: Jacques Grove aquarapid@gmail.com

Not used by default.  To use:
  * Set LD_PRELOAD=/usr/lib/libtcmalloc_minimal.so.4
  * or  LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.1
in your container startup environment.

Signed-off-by: Jacques Grove <aquarapid@gmail.com>
Copy link
Copy Markdown
Contributor

@saifalharthi saifalharthi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Collaborator

@deepthi deepthi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know what the docker image size is before and after this change?

@aquarapid
Copy link
Copy Markdown
Contributor Author

After the PR change, the image is about 600 KB larger (843304560 bytes now)

@indera-shsp
Copy link
Copy Markdown
Contributor

Silly question: it is possible to use only one or the other allocator right?

Good to know

@aquarapid
Copy link
Copy Markdown
Contributor Author

Correct; use only one. If it wasn't clear from some of the linked issues; tcmalloc was more effective for most users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants