-
Notifications
You must be signed in to change notification settings - Fork 735
Set tcmalloc soft limit when profiling memory allocations #12379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
⚪ Test history | Ya make output | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
| NKikimrConsole::TConfigItem::MemoryControllerConfigItem})); | ||
|
|
||
| // When profiling memory it's convenient to set initial tcmalloc soft limit | ||
| #ifdef PROFILE_MEMORY_ALLOCATIONS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Не понятно почему этот код не может работать без PROFILE_MEMORY_ALLOCATIONS
- Настройки у нас горячие, поэтому и выставлять лимит надо в
HandleWakeup - Не понятно почему выставляем именно
SoftLimit. Что будет когда нам потребуется больше памяти?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Я бы лучше добавил отдельную новую настройку в TMemoryControllerConfig, например AllocatorLimit
Но надо тогда написать как будет всё работать при её выставлении (и желательно и в доку)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Без этого флага он (лимит) сейчас примерно бесполезен для kqp - и при его достижении выполняется не то чтобы сильно отлаженный код внутри самого tcmalloc. Поэтому он точно должен быть как минимум в режиме отладки - когда после достижения лимита нестрашно и упасть.
- Сценарий изменения настройки SoftLimit именно для tcmalloc другой: она сама горячая и мне удобнее при отладке менять её налету отдельно - без постоянной интерференции со стороны
HandleWakeup, который не реагирует на фактическое изменение HardLimit, а просто всегда выставляет известные ему значения. - Потому что логика колбека с печатью кучи завязана именно на SoftLimit. Ну и мы вроде корректно транслируем один SoftLimit в другой - либо я не понял вопрос.
|
Fine as a temporary solution before #12406 |
Changelog category