Solutions

Stay on top of everything MarkLogic

Be the first to know! News, product information, and events delivered straight to your inbox.

Sign Me Up

Learn

Stay on top of everything MarkLogic

Be the first to know! News, product information, and events delivered straight to your inbox.

Sign Me Up

Community

Stay on top of everything MarkLogic

Be the first to know! News, product information, and events delivered straight to your inbox.

Sign Me Up

Company

Stay on top of everything MarkLogic

Be the first to know! News, product information, and events delivered straight to your inbox.

Sign Me Up

 
Knowledgebase:
Jemalloc Memory Allocator
22 November 2016 01:21 PM

Summary

The jemalloc library is included with the MarkLogic install and is recommended to use as it has shown a performance boost over the default Linux malloc library.  It is included with the MarkLogic server install and is configured to be used by default. 

There have been cases where even if configured, the library is not used.  This article will give possible solutions to debug that.

Diagnostics

ErrorLog message on startup if jemalloc is not allocated:

Warning: Memory allocator is not jemalloc; check /etc/sysconfig/MarkLogic

Solutions

1) Make sure to use superuser shell or sudo and run the 'service MarkLogic restart'

2) Verify that the jemalloc library is present in the install directory (ie /opt/MarkLogic/lib/libjemalloc.so.1).

3) Has the /etc/sysconfig/MarkLogic configuration file been modified from the default?  Try setting the configuration file back to the default and restarting the server.

4) Confirm that /etc/sysconfig/MarkLogic contain the following lines:
# preload jemalloc
if [ -e $MARKLOGIC_INSTALL_DIR/lib/libjemalloc.so.1 ]; then
   export LD_PRELOAD=$MARKLOGIC_INSTALL_DIR/lib/libjemalloc.so.1
fi

Details

For more information on the jemalloc library, please review the article provided by Facebook Engineering

https://www.facebook.com/notes/facebook-engineering/scalable-memory-allocation-using-jemalloc/480222803919/

(0 vote(s))
Helpful
Not helpful

Comments (0)