Yes, we tried ALLOCATOR as well. The result is the same. In fact, without specifying ALLOCATOR, cmake is able to find tcmalloc that is installed and use it. However, although libtcmalloc.so is listed in the “LINK_LIBRARIES” part of radosgw, it is somehow ignored until I moved boost/lib/libboost_thread.a to be in front of it. This change can be either manually done in build.ninja or by adding “Boost::thread” in front of $(ALLOC_LIBS) in src/rgw/CMakeLists.txt for radosgwd. Why the position of boost thread library makes a difference is beyond me. By the way, we are using boost 1.75 and gperftools 2.7. Thanks, Yixin > On Oct 20, 2023, at 2:29 PM, Casey Bodley <cbodley@xxxxxxxxxx> wrote: > > the cmake variable ALLOCATOR can be used to request a specific > library: https://github.com/ceph/ceph/blob/f080406/CMakeLists.txt#L376-L420 > > rgw and other ceph binaries refer to ALLOC_LIBS to add that link dependency > > On Fri, Oct 20, 2023 at 2:20 PM Casey Bodley <cbodley@xxxxxxxxxx> wrote: >> >> On Fri, Oct 20, 2023 at 1:54 PM Yixin Jin <yjin77@xxxxxxxx> wrote: >>> >>> Hi folks, >>> >>> How could I make rgw built with tcmalloc/jemalloc? I had tcmalloc installed. Although build.ninja has libtcmalloc.so listed for bin/radosgw, it is still using libc’s malloc. Then I had jemalloc installed and the result is the same. What is the proper step to make rgw built with tcmalloc/jemalloc? >> >> how can you tell that it's still using libc? >> >> $ ldd bin/radosgw | grep tcmalloc >> libtcmalloc.so.4 => /lib64/libtcmalloc.so.4 (0x00007f0bd3000000) >> >>> >>> Thanks >>> Yixin >>> _______________________________________________ >>> Dev mailing list -- dev@xxxxxxx >>> To unsubscribe send an email to dev-leave@xxxxxxx > _______________________________________________ > Dev mailing list -- dev@xxxxxxx > To unsubscribe send an email to dev-leave@xxxxxxx _______________________________________________ Dev mailing list -- dev@xxxxxxx To unsubscribe send an email to dev-leave@xxxxxxx