Tencent / yadcc

Yet Another Distributed C++ Compiler. yadcc是一套腾讯广告自研的分布式编译系统,用于支撑腾讯广告的日常开发及流水线。相对于已有的同类解决方案,我们针对实际的工业生产环境做了性能、可靠性、易用性等方面优化。
Other
371 stars 62 forks source link

Memory Usage for Large File Operations #22

Closed XlousZ closed 2 years ago

XlousZ commented 3 years ago
{
    flare::NoncontiguousBuffer standard_output;
    ......
    auto result = flare::FlattenSlow(output->standard_output);
    auto deps_list = flare::Split(result, '\n');
}

a 400 MB file is cached in standard_output. After I use it, I find that the memory is still occupied and cannot be released.

0x804d8000 commented 3 years ago

NoncontiguousBuffer is implemented using object pool, memory reclamation may be deferred in certain cases.

By default, several hundreds megabytes memory will be reserved by the object pool. See if memory usage keeps increasing when you cache and free more files.

XlousZ commented 2 years ago

Reaching %5 and no more increasing. Fortunately, my data can be processed by line. Reading data by row to avoid memory usage of large file data.