Skip to main content
added 397 characters in body
Source Link
Gerald Schneider
  • 26.8k
  • 9
  • 65
  • 99

I started a docker container with the official redis:6.0 image and here the setting works, and the version string looks basically identical.

root@42613c835e31:/data# redis-server --version Redis server v=6.0.19 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=3aa1eb72f68fbe5e root@42613c835e31:/data# redis-cli 127.0.0.1:6379> CONFIG SET activedefrag yes OK 

But ldd shows that it is NOT linked to a jemalloc library:

root@42613c835e31:/data# ldd `which redis-server` linux-vdso.so.1 (0x00007ffe4a9a2000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5b6aa41000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5b6aa3b000) libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f5b6a9a8000) libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f5b6a6b3000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5b6a691000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5b6a4bd000) /lib64/ld-linux-x86-64.so.2 (0x00007f5b6afa2000) 

It looks like the Ubuntu package is NOT compiled with the needed modified jemalloc library, but uses the Ubuntu default instead.

So the only options I currently see are:

The package from the Redis repo is compiled with the modified jemalloc, the activedefrag config works with it. This seems to be the most promising option, as updates will be handled automatically with regular system updates. I'll try to switch from the Ubuntu package to it next.

I started a docker container with the official redis:6.0 image and here the setting works, and the version string looks basically identical.

root@42613c835e31:/data# redis-server --version Redis server v=6.0.19 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=3aa1eb72f68fbe5e root@42613c835e31:/data# redis-cli 127.0.0.1:6379> CONFIG SET activedefrag yes OK 

But ldd shows that it is NOT linked to a jemalloc library:

root@42613c835e31:/data# ldd `which redis-server` linux-vdso.so.1 (0x00007ffe4a9a2000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5b6aa41000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5b6aa3b000) libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f5b6a9a8000) libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f5b6a6b3000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5b6a691000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5b6a4bd000) /lib64/ld-linux-x86-64.so.2 (0x00007f5b6afa2000) 

It looks like the Ubuntu package is NOT compiled with the needed modified jemalloc library, but uses the Ubuntu default instead.

So the only options I currently see are:

  • use the Docker Redis container image
  • compile Redis yourself

I started a docker container with the official redis:6.0 image and here the setting works, and the version string looks basically identical.

root@42613c835e31:/data# redis-server --version Redis server v=6.0.19 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=3aa1eb72f68fbe5e root@42613c835e31:/data# redis-cli 127.0.0.1:6379> CONFIG SET activedefrag yes OK 

But ldd shows that it is NOT linked to a jemalloc library:

root@42613c835e31:/data# ldd `which redis-server` linux-vdso.so.1 (0x00007ffe4a9a2000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5b6aa41000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5b6aa3b000) libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f5b6a9a8000) libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f5b6a6b3000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5b6a691000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5b6a4bd000) /lib64/ld-linux-x86-64.so.2 (0x00007f5b6afa2000) 

It looks like the Ubuntu package is NOT compiled with the needed modified jemalloc library, but uses the Ubuntu default instead.

So the only options I currently see are:

The package from the Redis repo is compiled with the modified jemalloc, the activedefrag config works with it. This seems to be the most promising option, as updates will be handled automatically with regular system updates. I'll try to switch from the Ubuntu package to it next.

Source Link
Gerald Schneider
  • 26.8k
  • 9
  • 65
  • 99

I started a docker container with the official redis:6.0 image and here the setting works, and the version string looks basically identical.

root@42613c835e31:/data# redis-server --version Redis server v=6.0.19 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=3aa1eb72f68fbe5e root@42613c835e31:/data# redis-cli 127.0.0.1:6379> CONFIG SET activedefrag yes OK 

But ldd shows that it is NOT linked to a jemalloc library:

root@42613c835e31:/data# ldd `which redis-server` linux-vdso.so.1 (0x00007ffe4a9a2000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5b6aa41000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5b6aa3b000) libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f5b6a9a8000) libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f5b6a6b3000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5b6a691000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5b6a4bd000) /lib64/ld-linux-x86-64.so.2 (0x00007f5b6afa2000) 

It looks like the Ubuntu package is NOT compiled with the needed modified jemalloc library, but uses the Ubuntu default instead.

So the only options I currently see are:

  • use the Docker Redis container image
  • compile Redis yourself