Skip to content

Commit 86056a8

Browse files
authored
Merge pull request #66028 from ClickHouse/remove-scary-jemalloc-log
Remove scary jemalloc log
2 parents af4844b + c86cdbb commit 86056a8

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

programs/server/Server.cpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,6 @@
133133
# include <Server/KeeperTCPHandlerFactory.h>
134134
#endif
135135

136-
#if USE_JEMALLOC
137-
# include <jemalloc/jemalloc.h>
138-
#endif
139-
140136
#if USE_AZURE_BLOB_STORAGE
141137
# include <azure/storage/common/internal/xml_wrapper.hpp>
142138
# include <azure/core/diagnostics/logger.hpp>
@@ -176,34 +172,10 @@ namespace ProfileEvents
176172

177173
namespace fs = std::filesystem;
178174

179-
#if USE_JEMALLOC
180-
static bool jemallocOptionEnabled(const char *name)
181-
{
182-
bool value;
183-
size_t size = sizeof(value);
184-
185-
if (mallctl(name, reinterpret_cast<void *>(&value), &size, /* newp= */ nullptr, /* newlen= */ 0))
186-
throw Poco::SystemException("mallctl() failed");
187-
188-
return value;
189-
}
190-
#else
191-
static bool jemallocOptionEnabled(const char *) { return false; }
192-
#endif
193-
194175
int mainEntryClickHouseServer(int argc, char ** argv)
195176
{
196177
DB::Server app;
197178

198-
if (jemallocOptionEnabled("opt.background_thread"))
199-
{
200-
LOG_ERROR(&app.logger(),
201-
"jemalloc.background_thread was requested, "
202-
"however ClickHouse uses percpu_arena and background_thread most likely will not give any benefits, "
203-
"and also background_thread is not compatible with ClickHouse watchdog "
204-
"(that can be disabled with CLICKHOUSE_WATCHDOG_ENABLE=0)");
205-
}
206-
207179
/// Do not fork separate process from watchdog if we attached to terminal.
208180
/// Otherwise it breaks gdb usage.
209181
/// Can be overridden by environment variable (cannot use server config at this moment).

0 commit comments

Comments
 (0)