Hi,

I've run into bihash crashing VPP with an out-of-memory error. After
investigation I found that the bihash has reached its configured
memory limit with far less entries that I would have expected.
Some numbers:

Type: bihash_8_8
bihash max. memory: 64MB
Buckets: 1024
Entries 200k

With that number it turns out that almost all buckets have 2^9 pages
(512 pages).
On average 200 entries per bucket are actually used.
The total memory consumption from the buckets and pages should be
1024 * sizeof(bucket) + 1024 * 2^9 * sizeof(page) = 33 MB

Yet the bihash has consumed all 64MB (alloc_arena_next > memory_size).

It turned out that the missing memory was in the freelists for smaller
page sizes.

I have resized the bihash to have more buckets to avoid the large pages.

Is there anything else I can do?

I was thinking about enhancing bihash to specify a initial page size.
This would waste some memory while the hash is growing, but would
later avoid the fragmentation. Does that make sense?

Regards
Andreas
-- 
Andreas Schultz

-- 

Principal Engineer

t: +49 391 819099-224

------------------------------- enabling your networks
-----------------------------

Travelping GmbH

Roentgenstraße 13

39108 Magdeburg

Germany

t: +49 391 819099-0

f: +49 391 819099-299

e: [email protected]

w: https://www.travelping.com/


Company registration: Amtsgericht Stendal  Reg. No.: HRB 10578
Geschaeftsfuehrer: Holger Winkelmann VAT ID: DE236673780
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#13518): https://lists.fd.io/g/vpp-dev/message/13518
Mute This Topic: https://lists.fd.io/mt/32504802/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to