Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add libjemalloc2 and libtcmalloc-minimal4 to Dockerfile #222

Merged
merged 2 commits into from
May 31, 2023

Conversation

n0vad3v
Copy link
Member

@n0vad3v n0vad3v commented May 31, 2023

This PR adds two malloc lib to Dockerfile, which allows user to switch between them:

  • LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2 will use jemalloc
  • LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4.5.6 will use tcmalloc
  • If no LD_PRELOAD set, it will use Glibc malloc
version: '3'

services:
  webp:
    image: webpsh/webp-server-go
    restart: always
    environment:
      - MALLOC_ARENA_MAX=1
      #- LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
      - LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4.5.6
    volumes:
      - ./pics:/opt/pics
      - ./exhaust:/opt/exhaust
      - ./config.json:/etc/config.json
    ports:
      -  127.0.0.1:3333:3333

@n0vad3v n0vad3v linked an issue May 31, 2023 that may be closed by this pull request
@github-actions
Copy link


ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)


@codecov
Copy link

codecov bot commented May 31, 2023

Codecov Report

Merging #222 (08a0097) into master (9efead2) will decrease coverage by 3.24%.
The diff coverage is 77.81%.

@@            Coverage Diff             @@
##           master     #222      +/-   ##
==========================================
- Coverage   83.57%   80.34%   -3.24%     
==========================================
  Files           6        6              
  Lines         542      636      +94     
==========================================
+ Hits          453      511      +58     
- Misses         61       85      +24     
- Partials       28       40      +12     
Impacted Files Coverage Δ
encoder.go 67.03% <68.88%> (-10.11%) ⬇️
helper.go 82.35% <74.60%> (-6.42%) ⬇️
router.go 93.16% <95.00%> (+3.47%) ⬆️
config.go 100.00% <100.00%> (ø)
prefetch.go 100.00% <100.00%> (ø)
webp-server.go 79.20% <100.00%> (+2.03%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link


ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)


@BennyThink BennyThink merged commit 9761383 into master May 31, 2023
@BennyThink BennyThink deleted the add-jemalloc branch May 31, 2023 10:51
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.

webp-server uses to much memory
2 participants