RoaringBitmap / CRoaring

Roaring bitmaps in C (and C++), with SIMD (AVX2, AVX-512 and NEON) optimizations: used by Apache Doris, ClickHouse, and StarRocks

Home Page:http://roaringbitmap.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Roaring - OR Operation - High memory usage in Oracle Linux 8(OEL8) when compared to Oracle Linux 7 (OEL7)

vinothcse123 opened this issue · comments

We are trying to migrate our application from OEL7 to OEL8 Linux distribution. We used Roaring Library in our application and we see 3 times high memory usage in roaring in OEL8 when compared to OEL7.

Mainly, we see this high usage on OR operator.

We are able to reproduce this in sample program and attached sample program and compilation script, run script for your reference. When we run this sample program in OEL7, we don't see any memory increase during OR operation.

In sample code we are iterating roaring bitset 1 Lakh times and doing OR operation. At few iteration, we are getting memory peak around 500KB to 1MB. In sample code we are doing for one bitset. But in our actual application code we will have lot of bitsets and OR operation which leads to heavy memory usage.

Additional Point:

When we remove shebang #!/bin/bash in run script, we don't see memory difference. Not sure like how it is related.

Roaring version : 3.0.1
roaring_issue.zip

I ran your program on my Rocky Linux 9 server and it prints nothing.

What makes you think that there is an issue with CRoaring? Can you elaborate?

@vinothcse123 I recommend building differently... Don't include roaring.c in your C++ code and enable optimizations:

c++ -O3 -std=c++11 -o RoaringAssign.cpp RoaringAssign.cpp roaring.c 

I am going to soon close this issue unless you can provide solid evidence that there is a problem with CRoaring.

@lemire we tried with optimization flag and still we are getting same results.

Actually the point here is we are getting this memory peak only on Oracle Linux 8(OEL8). So, I am not sure you will be able to reproduce this issue with Rocky Linux 9 server.

This problem is specific to Oracle Linux 8. You can see the difference in the screen shot attached in the ticket between OEL7 and OEL8 against this sample program.

I am going to close this, please report the issue to Oracle.