diff --git a/include/engine/unpacking_cache.hpp b/include/engine/unpacking_cache.hpp index c348a742f..822a2c13f 100644 --- a/include/engine/unpacking_cache.hpp +++ b/include/engine/unpacking_cache.hpp @@ -42,18 +42,27 @@ class UnpackingCache // = n * 21 bytes // Total = n * (25 + 21) = n * 46 bytes // Total cache size: 500 mb = 500 * 1024 *1024 bytes = 524288000 bytes + // Total cache size: 1024 mb = 1024 * 1024 *1024 bytes = 1073741824 bytes + // Total cache size: 500 mb = 500 * 1024 *1024 bytes = 524288000 bytes - // THREAD LOCAL STORAGE + // THREAD LOCAL STORAGE (500 mb) // Number of lines we need = 524288000 / 46 / number of threads = 11397565 / number of threads // 16 threads: 11397565 / 16 = 712347 // 8 threads: 11397565 / 8 = 1424695 // 4 threads: 11397565 / 4 = 2849391 // 2 threads: 11397565 / 2 = 5698782 + // THREAD LOCAL STORAGE (1024 mb) + // Number of lines we need = 1073741824 / 46 / number of threads = 23342213 / number of threads + // 16 threads: 23342213 / 16 = 1458888 + // 8 threads: 23342213 / 8 = 2917776 + // 4 threads: 23342213 / 4 = 5835553 + // 2 threads: 23342213 / 2 = 11671106 + // SHARED STORAGE CACHE // Number of lines we need for shared storage cache = 524288000 / 20 = 26214400 - UnpackingCache(unsigned timestamp) : m_cache(712347), m_current_data_timestamp(timestamp){}; + UnpackingCache(unsigned timestamp) : m_cache(1458888), m_current_data_timestamp(timestamp){}; UnpackingCache(std::size_t cache_size, unsigned timestamp) : m_cache(cache_size), m_current_data_timestamp(timestamp){};