| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
classic-osds have always caused significant memory fragmentation
when using the libc memory allocator due to the way that Ceph
tends to utilize memory. In recent testing, crimson-osd was found
to use 25-27GB of RAM with the stock 3GB bluestore cache settings
(osd_memory_target is only used when tcmalloc is available). Upon
further testing, it was found that the classic OSD is even worse,
using between 32-33GB of RAM after a 5 minute 4K sequential
write test when using libc malloc.
The good news is that it appears that crimson-osd is able to use
tcmalloc for alienstore without significant modification. Better
still, it drastically reduces memory usage. In the same test that
resulted in 25GB RSS memory usage for crimson-osd with libc malloc,
a tcmalloc linked version took around 9GB (with an 8GB
osd_memory_target). Since we do not yet (afaik) expose classic OSD
debugging in crimson it is tough to tell why we are still a little
over, but it's clear that for alienstore we are going to need to
use tcmalloc as we do in classic.
Signed-off-by: Mark Nelson <mnelson@redhat.com>
(cherry picked from commit 9f31ad7b7388996307808e26722260aed29d4ea1)
|
|\
| |
| |
| |
| |
| |
| |
| | |
* refs/pull/41338/head:
mds: reset code after cpu_profiler
cpu_profiler: fix asok command crash
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
|
| |
| |
| |
| |
| | |
fixes: https://tracker.ceph.com/issues/50814
Signed-off-by: liu shi <liu.shi@navercorp.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ceph::allocator was originally introduced to address
https://tracker.ceph.com/issues/39703, so that if tcmalloc < 2.6.2
detected, the homebrew allocator is used. otherwise std::allocator would
use the aligned_alloc() function which was not implemented by tcmalloc <
2.6.2. but the fix in tcmalloc implementing aligned_alloc() was
introduced in https://github.com/gperftools/gperftools/commit/d406f228.
that fix was included since gperftools 2.6.2.
- CentOS/RHEL8 includes gperftools 2.7,
- fedora 33 includes gperftools 2.8,
- ubuntu/focal comes with libgoogle-perftools-dev 2.7
- ubuntu/bionic ships libgoogle-perftools-dev 2.5. but since we
detect libtcmalloc 2.6.2, when building on bionic, JeMalloc
or libc allocator is used as fallback.
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
|
|
|
| |
This is part of a series of commits to clean up using namespace at top
level in headers.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
|
|
|
|
|
|
|
| |
This is part of a series of commits to clean up using namespace at top
level in headers.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
|
|
|
|
|
|
|
| |
alien bluestore will link with heap profiler, but seastar not support
heap profiler with seastar defaut allocator, so disable it.
Signed-off-by: Chunmei Liu <chunmei.liu@intel.com>
|
|
|
|
| |
Signed-off-by: Zengran Zhang <zhangzengran@sangfor.com.cn>
|
|
|
|
|
|
|
|
|
|
| |
as the higher version of libstdc++ is backward compatible with the lower
ones. so there is no need to statically link against C++ libraries. they
can always use the libstdc++ ships with the distro.
This reverts commit a6c73b6ac1d81cc9f467aa38e5afb146d5dea6c2
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
we could create a mini project to build a shared library, and use
try_compile() to test if the found gperftools is compiled with -fPIC.
but as we are targeting mostly xenial when enabling
WITH_STATIC_LIBSTDCXX, and google-perftools on xenial by default
is built without -fPIC. so let's keep it simple.
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
| |
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
| |
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
this change introduce three classes: ConfigValues, ConfigProxy and
ConfigReader. in seastar port of OSD, each CPU shard will hold its own
reference of configuration, and upon changes of settings, each
shard will be updated with the new setting in async. so this forces us
to be able to keep two set of configuration at the same time. so we
need to extract the changeable part of md_config_t out. so we can
replace the old one with new one on demand, and let different shards
share the same unchanged part, amon the other things, the Options map
and the lookup tables. that's why we need ConfigValues. we will add
a policy template for this class, so we can specialize for Seastar
implementation to allow different ConfigProxy instances to point
md_config_impl<> to different ConfigValues.
because the observer interface is still using md_config_t, to minimise
the impact of this change, handle_conf_change() and
handle_subsys_change() are not changed. but as it accepts a `const
md_config_t`, which cannot be used to create/reference the ConfigProxy
holding it, we need to introduce ConfigReader for reading the updated
setting from md_config_t in a simpler way, without exposing the
internal "values" member variable.
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
| |
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
|
|
|
|
|
|
|
| |
As a transition for g_ceph_context removal, make all dout macros depends
on a local macro.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* remove Findtcmalloc.cmake, use Findgperftools.cmake instead.
* tcmalloc is packaged in gperftools-dev, so we can check them in a single
place.
* fix the check of heap-profiler.h, we should enable the check as long
as tcmalloc is enabled or profiler is enabled.
* only check gperftools headers in "include/gperftools", and do not
"include/google" anymore. as we only support the distros which
shipping recent gperftools-dev package with "include/gperftools".
and "google/*.h" are deprecated.
* set ALLOC_LIBS with GPERFTOOLS_TCMALLOC_LIBRARY, so we can link
against tcmalloc with full path.
Signed-off-by: Kefu Chai <kchai@redhat.com>
|
|
|
|
| |
Signed-off-by: Samuel Just <sjust@redhat.com>
|
|
|
|
| |
Signed-off-by: Samuel Just <sjust@redhat.com>
|
|\
| |
| |
| |
| | |
Conditional-compile against minimal tcmalloc.
Reviewed-by: Loic Dachary <ldachary@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Certain older systems (SLE11 in this case) do not provide the full
tcmalloc functionality, due to e.g. incomplete libunwind
pieces. Use --with-tcmalloc-minimal to enable the cut-down
version.
Here's how the various mem allocator switches interact now:
--with-jemalloc: overrides --with-tcmalloc & --with-tcmalloc-minimal
--with-tcmalloc-minimal: overrides --with-tcmalloc
--with-tcmalloc: the default. use --without-tcmalloc to disable
Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
|
|/
|
|
|
|
|
|
|
| |
The patch adds disabled perfglue stubs to DENCODER sources in order to
avoid tcmalloc-enabled ceph-dencoder builds.
Refs: #10691
Signed-off-by: Boris Ranto <branto@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The google/ headers location has been deprecated as of gperftools 2.0.
As of gperftools 2.2rc, the google/ headers will now give deprecation
warnings, and they will probably disappear in a future gperftools
update.
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
|
|
|
|
|
|
|
| |
With a 1024 bytes buffer to display the stats, the end is truncated.
Use an array on the stack instead of leaking the buffer.
Signed-off-by: Loic Dachary <loic-201408@dachary.org>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We used to pass 'heap' as the first element of the cmd vector when
handling commands. We haven't been doing so for a while now, so we
needed to fix this.
Not expecting 'heap' also makes sense, considering that what we need to
know when we reach this function is what command we should handle, and
we should not care what the caller calls us when handling his business.
Fixes: #6361
Backport: dumpling
Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Fixes --without-tcmalloc on boxes without libtcmalloc.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
|
|/
|
|
|
|
|
|
| |
- Enabling subdir objects
- Created a Makefile-env.am with basic automake init
- Created .am files per subdir, included from src/Makefile.am
Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
|
|
|
|
|
|
| |
These don't appear to work. Setting CPUPROFILE=path on startup does.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
| |
This let's the 'ceph tell osd.N cpu_profiler ...' command return the result
to the caller.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
|
|
|
|
| |
Let MonClient and Monitor handle delivery of messages. This puts them in
control and lets them trigger sending of more messages when we have a
bunch queued.
Signed-off-by: Sage Weil <sage@inktank.com>
|
|
|
|
| |
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix a bug that made it impossible to turn off logging to a file.
Remove the old "log_dir" setting. It has been deprecated for a long
time, and it adds a lot of complexity to the code.
heap_profiler: use the directory that log_file is in to construct a
profiler output file name. Don't use log_dir.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
|
|
|
|
|
|
|
| |
If log_dir was empty then the prefix would be of the form /mon.a
That isn't good, so fill it in so it writes to the current dir.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
|
|
|
|
| |
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Options that are inherently global, like malloc settings, and also
inherently debugging or profiling settings should be environment
variables.
tcmalloc_profiler_run, profiler_allocation_interval,
profiler_highwater_interval, and buffer_track_alloc fall into this
category.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
|
|
|
|
| |
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use std::string to represent md_config_t strings. This makes memory
management a lot easier and should fix some leaks. "No value" is now
represented by an empty string, whereas before some places were using
empty strings and some were using NULL.
config.cc: Fix a minor decode bug.
In pid_file.cc, copy the pid_file using snprintf, since strncpy
does not always NULL-terminate.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
|
|
|
|
| |
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
|
|
|
|
| |
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
|
|
|
|
|
|
|
| |
Switch the OSD and MDS to use it, instead of handling
the calls on their own. Note that this is a command interface change!
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we used function pointers. Fun for me to learn about, icky
to actually have!
Now we use our own wrapper functions with two implementations -- one
for with tcmalloc and one without. Make those programs which
are tcmalloc-aware build with the appropriate implementation source
at compile-time, but leave the wrapper function stubs in
no matter what.
While we're at it, implement two of the "MallocExtension" calls in
the OSD.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
|
|
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
|