Questions tagged [jemalloc]

jemalloc is a general purpose malloc implementation that emphasizes fragmentation avoidance and scalable concurrency support.

jemalloc is a general purpose malloc implementation that emphasizes fragmentation avoidance and scalable concurrency support.

85 questions
37
votes
2 answers

Error jemalloc/jemalloc.h: No such file or directory when making Redis

I'm try to setup my Redis server, when execute make command, got error: "jemalloc/jemalloc.h: No such file or directory when making Redis", I have tried all steps I can find, such as make distclean or make MALLOC=libc. I'm working on CentOS, it is…
Neo Feng
  • 371
  • 1
  • 3
  • 5
21
votes
10 answers

Redis Installation fails with "Newer version of jemalloc required" when running make command

Redis installation on RHEL fails when running make command. Below is the output cd src && make all make[1]: Entering directory `/root/Downloads/redis-3.2.0/src' CC adlist.o In file included from adlist.c:34: zmalloc.h:50:31: error:…
Vijay
  • 1,506
  • 2
  • 9
  • 8
12
votes
1 answer

Debugging sidekiq worker memory leak with jemalloc

So, I've got a memory leak in my Sidekiq worker. I have a worker server with one queue for this worker task only, that gets to about 10G RSS in a week. I tried to reproduce it locally with only 1 worker thread and voila - I get from 200M to 1G in…
Roman
  • 389
  • 1
  • 13
8
votes
2 answers

ruby with jemalloc won't configure - homebrew/OSX/montery/m1/arm(?)

OSX/Monterey/M1/Arm/Homebrew: can't for the life of me get this to work: ./configure --with-jemalloc It dies with checking jemalloc/jemalloc.h presence... no configure: error: jemalloc requested but not found even though it's right there in:…
jsharpe
  • 2,546
  • 3
  • 26
  • 42
8
votes
3 answers

Error on installing ruby with jemalloc

I am on ubuntu 12.04.5 LTS and tried installing ruby with jemalloc. The jemalloc got installed successfully(https://blog.scalingo.com/2017/05/02/improve-ruby-application-memory-jemalloc.html) but while installing the ruby 2.3.4, it gave this…
Bachan Smruty
  • 5,686
  • 1
  • 18
  • 23
7
votes
1 answer

Find native memory leak in Java application using JeMalloc

Currently I am trying to resolve a Java memory issue: My Java application keeps using more and more memory and eventually it gets killed by the Linux OOM killer. There is probably a Native Memory leak, because after inspection of the JVM with…
extremecoder85
  • 119
  • 1
  • 12
6
votes
0 answers

jemalloc / jeprof shows addresses not function names based on lg_prof_interval

I'm trying to debug a memory leak in some vendor-provided JNI/native code and, like many people it seems, started here: https://technology.blog.gov.uk/2015/12/11/using-jemalloc-to-get-to-the-bottom-of-a-memory-leak/ I've found if I run: export…
6
votes
1 answer

How to use Node.js with Jemalloc?

Node.js can be used with Jemalloc (https://github.com/nodejs/node/issues/21973). In most cases it would shorten RSS and this is my huge problem. But I can't find any info about how to use node with Jemalloc, nor on a machine, nor in docker. Can…
Terion
  • 2,396
  • 3
  • 28
  • 42
6
votes
1 answer

JVM_FindSignal function continuously allocates native memory

My java web application deployed in tomcat8 on a linux machine has been leaking native memory, I've tried to detect the source of the leak by using jemalloc profiling as described here: https://github.com/jeffgriffith/native-jvm-leaks Output of the…
vlashel
  • 345
  • 2
  • 15
5
votes
2 answers

How to add jemalloc to existing rails server using rvm?

how to add jemalloc in a working ruby on rails server?We installed ruby using rvm. Rails version:5.2 Ruby version:2.5.1 I tried ruby -r rbconfig -e "puts RbConfig::CONFIG['LIBS']" whose output i got as -lpthread -lgmp -ldl -lcrypt -lm I saw an…
Jose Kj
  • 2,912
  • 2
  • 28
  • 40
5
votes
2 answers

jemalloc using jeprof to generate gif from '*.heap' files

First of all the purpose of the jemalloc (within my usecase) is to trace native memory allocations caused by things like JNI invocations, so let's begin: Hello guys I have some serious issue here. We happen to have a memory leak in one of our…
Pawel
  • 61
  • 1
  • 4
4
votes
1 answer

Ruby 3.0.0 seemingly doesn't use jemalloc

I've installed jemalloc and followed all the guides, but it just doesn't look like ruby is using it: $ apt install libjemalloc2 $ ls -la /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 -rw-r--r-- 1 root root xxxxxx Feb 23 2019…
alecvn
  • 541
  • 1
  • 4
  • 15
4
votes
0 answers

How to find method that calls unsafe allocations?

I'm trying to find a native memory leak in my production application. The problem is to get know which method in my code does unsafe.allocateMemory(size) without unsafe.freeMemory(startIndex) This is for Ubuntu 18.04, java version "1.8.0_191". //…
Alexandr
  • 41
  • 2
4
votes
1 answer

What are the advantages and disadvantage of using jemalloc vs malloc vs calloc and other common alternatives?

Reading the Rust subreddit today I came across comments that: jemalloc is optimized for (multithreaded) speed, not memory usage After doing more research I found that there are even more alternatives (such as calloc). I would like to understand…
Greg
  • 8,175
  • 16
  • 72
  • 125
4
votes
1 answer

Java native memory leak with G1 and huge memory

We currently have problems with a java native memory leak. Server is quite big (40cpus, 128GB of memory). Java heap size is 64G and we run a very memory intensive application reading lot of data to strings with about 400 threads and throwing them…
1
2 3 4 5 6