mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
Update allocated with resident if no jemalloc
This commit is contained in:
parent
04d80ec276
commit
ec5459a60d
@ -310,15 +310,19 @@ void MemoryWorker::backgroundThread()
|
|||||||
ProfileEvents::increment(ProfileEvents::MemoryAllocatorPurge);
|
ProfileEvents::increment(ProfileEvents::MemoryAllocatorPurge);
|
||||||
ProfileEvents::increment(ProfileEvents::MemoryAllocatorPurgeTimeMicroseconds, purge_watch.elapsedMicroseconds());
|
ProfileEvents::increment(ProfileEvents::MemoryAllocatorPurgeTimeMicroseconds, purge_watch.elapsedMicroseconds());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (unlikely(first_run || total_memory_tracker.get() < 0))
|
if (unlikely(first_run || total_memory_tracker.get() < 0))
|
||||||
{
|
{
|
||||||
|
#if USE_JEMALLOC
|
||||||
if (source != MemoryUsageSource::Jemalloc)
|
if (source != MemoryUsageSource::Jemalloc)
|
||||||
epoch_mib.setValue(0);
|
epoch_mib.setValue(0);
|
||||||
|
|
||||||
MemoryTracker::updateAllocated(allocated_mib.getValue());
|
MemoryTracker::updateAllocated(allocated_mib.getValue());
|
||||||
}
|
#elif defined(OS_LINUX)
|
||||||
|
MemoryTracker::updateAllocated(resident);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
ProfileEvents::increment(ProfileEvents::MemoryWorkerRun);
|
ProfileEvents::increment(ProfileEvents::MemoryWorkerRun);
|
||||||
ProfileEvents::increment(ProfileEvents::MemoryWorkerRunElapsedMicroseconds, total_watch.elapsedMicroseconds());
|
ProfileEvents::increment(ProfileEvents::MemoryWorkerRunElapsedMicroseconds, total_watch.elapsedMicroseconds());
|
||||||
|
Loading…
Reference in New Issue
Block a user