|
133 | 133 | # include <Server/KeeperTCPHandlerFactory.h> |
134 | 134 | #endif |
135 | 135 |
|
136 | | -#if USE_JEMALLOC |
137 | | -# include <jemalloc/jemalloc.h> |
138 | | -#endif |
139 | | - |
140 | 136 | #if USE_AZURE_BLOB_STORAGE |
141 | 137 | # include <azure/storage/common/internal/xml_wrapper.hpp> |
142 | 138 | # include <azure/core/diagnostics/logger.hpp> |
@@ -176,34 +172,10 @@ namespace ProfileEvents |
176 | 172 |
|
177 | 173 | namespace fs = std::filesystem; |
178 | 174 |
|
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 | | - |
194 | 175 | int mainEntryClickHouseServer(int argc, char ** argv) |
195 | 176 | { |
196 | 177 | DB::Server app; |
197 | 178 |
|
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 | | - |
207 | 179 | /// Do not fork separate process from watchdog if we attached to terminal. |
208 | 180 | /// Otherwise it breaks gdb usage. |
209 | 181 | /// Can be overridden by environment variable (cannot use server config at this moment). |
|
0 commit comments