Here’s what I get, which is to say completely normal operation:
Cycle 0 out of 10...
Pick 1234 unique random keys...
Add items...
Hash table test
1234 active elements 1192 active buckets
1 free lists
[len 1] 0 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817eca40
used 207424 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
Search for items 1 times...
43498184 searches per second
1234 searches in .000028 seconds
Standard E-hash search for items 1 times...
1234 searches in .000078 seconds
15888139 searches per second
Delete items...
Kernel RSS: 5348 bytes
Hash table test
0 active elements 0 active buckets
1 free lists
[len 1] 1192 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817eca40
used 207424 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
Cycle 1 out of 10...
Pick 1234 unique random keys...
Add items...
Hash table test
1234 active elements 1193 active buckets
1 free lists
[len 1] 0 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817eca80
used 207488 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
Search for items 1 times...
44315161 searches per second
1234 searches in .000028 seconds
Standard E-hash search for items 1 times...
1234 searches in .000078 seconds
15748433 searches per second
Delete items...
Kernel RSS: 5348 bytes
Hash table test
0 active elements 0 active buckets
1 free lists
[len 1] 1193 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817eca80
used 207488 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
Cycle 2 out of 10...
Pick 1234 unique random keys...
Add items...
Hash table test
1234 active elements 1177 active buckets
1 free lists
[len 1] 16 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817eca80
used 207488 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
Search for items 1 times...
43360624 searches per second
1234 searches in .000028 seconds
Standard E-hash search for items 1 times...
1234 searches in .000079 seconds
15706539 searches per second
Delete items...
Kernel RSS: 5348 bytes
Hash table test
0 active elements 0 active buckets
1 free lists
[len 1] 1193 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817eca80
used 207488 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
Cycle 3 out of 10...
Pick 1234 unique random keys...
Add items...
Hash table test
1234 active elements 1191 active buckets
1 free lists
[len 1] 2 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817eca80
used 207488 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
Search for items 1 times...
30866204 searches per second
1234 searches in .000039 seconds
Standard E-hash search for items 1 times...
1234 searches in .000079 seconds
15626385 searches per second
Delete items...
Kernel RSS: 5348 bytes
Hash table test
0 active elements 0 active buckets
1 free lists
[len 1] 1193 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817eca80
used 207488 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
Cycle 4 out of 10...
Pick 1234 unique random keys...
Add items...
Hash table test
1234 active elements 1187 active buckets
1 free lists
[len 1] 6 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817eca80
used 207488 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
Search for items 1 times...
43314963 searches per second
1234 searches in .000028 seconds
Standard E-hash search for items 1 times...
1234 searches in .000079 seconds
15427314 searches per second
Delete items...
Kernel RSS: 5348 bytes
Hash table test
0 active elements 0 active buckets
1 free lists
[len 1] 1193 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817eca80
used 207488 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
Cycle 5 out of 10...
Pick 1234 unique random keys...
Add items...
Hash table test
1234 active elements 1190 active buckets
1 free lists
[len 1] 3 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817eca80
used 207488 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
Search for items 1 times...
43346915 searches per second
1234 searches in .000028 seconds
Standard E-hash search for items 1 times...
1234 searches in .000078 seconds
15819904 searches per second
Delete items...
Kernel RSS: 5348 bytes
Hash table test
0 active elements 0 active buckets
1 free lists
[len 1] 1193 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817eca80
used 207488 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
Cycle 6 out of 10...
Pick 1234 unique random keys...
Add items...
Hash table test
1234 active elements 1194 active buckets
1 free lists
[len 1] 0 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817ecac0
used 207552 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
Search for items 1 times...
43473665 searches per second
1234 searches in .000028 seconds
Standard E-hash search for items 1 times...
1234 searches in .000081 seconds
15302010 searches per second
Delete items...
Kernel RSS: 5348 bytes
Hash table test
0 active elements 0 active buckets
1 free lists
[len 1] 1194 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817ecac0
used 207552 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
Cycle 7 out of 10...
Pick 1234 unique random keys...
Add items...
Hash table test
1234 active elements 1189 active buckets
1 free lists
[len 1] 5 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817ecac0
used 207552 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
Search for items 1 times...
43257265 searches per second
1234 searches in .000029 seconds
Standard E-hash search for items 1 times...
1234 searches in .000080 seconds
15386533 searches per second
Delete items...
Kernel RSS: 5348 bytes
Hash table test
0 active elements 0 active buckets
1 free lists
[len 1] 1194 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817ecac0
used 207552 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
Cycle 8 out of 10...
Pick 1234 unique random keys...
Add items...
Hash table test
1234 active elements 1194 active buckets
1 free lists
[len 1] 0 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817ecac0
used 207552 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
Search for items 1 times...
43229987 searches per second
1234 searches in .000029 seconds
Standard E-hash search for items 1 times...
1234 searches in .000080 seconds
15365267 searches per second
Delete items...
Kernel RSS: 5348 bytes
Hash table test
0 active elements 0 active buckets
1 free lists
[len 1] 1194 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817ecac0
used 207552 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
Cycle 9 out of 10...
Pick 1234 unique random keys...
Add items...
Hash table test
1234 active elements 1203 active buckets
1 free lists
[len 1] 0 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817ecd00
used 208128 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
Search for items 1 times...
24096856 searches per second
1234 searches in .000051 seconds
Standard E-hash search for items 1 times...
1234 searches in .000088 seconds
14005697 searches per second
Delete items...
Kernel RSS: 5348 bytes
Hash table test
0 active elements 0 active buckets
1 free lists
[len 1] 1203 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817ecd00
used 208128 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
End of run, should be empty...
Hash table test
0 active elements 0 active buckets
1 free lists
[len 1] 1203 free elts
0 linear search buckets
0 cache hits, 0 cache misses
arena: base 7f61817ba000, next 7f61817ecd00
used 208128 b (0 Mbytes) of 4293918720 b (4095 Mbytes)
From: Vijay Katamreddy (vkatamre)
Sent: Saturday, August 11, 2018 5:24 AM
To: Dave Barach (dbarach) <[email protected]>
Cc: [email protected]
Subject: Re: [vpp-dev] format_bihash not printing all the elements
Hi Dave,
Could you please let me know what params do you use for testing the
“test_bihash_template” executable?
vec64 options is passing, but other than that I am struggling to use without
segmentation faults.
For this test, I don’t have any changes in the test_bihash_template or
bihash_template.[hc] files..
# test_bihash_template nitems 1234 nbuckets 16384 ncycles 10
Segmentation fault
Thanks
Vijay
From: <[email protected]<mailto:[email protected]>> on behalf of
"Vijayabhaskar Katamreddy via Lists.Fd.Io"
<[email protected]<mailto:[email protected]>>
Reply-To: "Vijay Katamreddy (vkatamre)"
<[email protected]<mailto:[email protected]>>
Date: Wednesday, August 8, 2018 at 9:53 PM
To: "Dave Barach (dbarach)" <[email protected]<mailto:[email protected]>>
Cc: "[email protected]<mailto:[email protected]>"
<[email protected]<mailto:[email protected]>>
Subject: Re: [vpp-dev] format_bihash not printing all the elements
Thank you Dave or your email !
“The test replaces many, many keys on purpose.”
I did not pay attention to the above, rather I was counting the number of times
inserted and display wise.
Once I made keys unique all the time, its working as expected!
Thanks
Vijay
From: "Dave Barach (dbarach)" <[email protected]<mailto:[email protected]>>
Date: Wednesday, August 8, 2018 at 5:14 PM
To: "Vijay Katamreddy (vkatamre)"
<[email protected]<mailto:[email protected]>>
Cc: "[email protected]<mailto:[email protected]>"
<[email protected]<mailto:[email protected]>>
Subject: RE: format_bihash not printing all the elements
What is the maximum value of j at the start of the inner loop? Note that kv.key
= i. The test replaces many, many keys on purpose.
Set TESTS += test_bihash_template in vppinfra.am
From: Vijay Katamreddy (vkatamre)
Sent: Wednesday, August 8, 2018 3:47 PM
To: Dave Barach (dbarach) <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]>
Subject: Re: format_bihash not printing all the elements
Hi Dave,
I took code from the below routine in test_bihash_template.c
test_bihash_vec64 (test_main_t * tm)
{
…
}
for (j = 0; j < 3; j++)
{
for (i = 1; i <= j * 1000 + 1; i++)
{
kv.key = i;
kv.value = 1;
BV (clib_bihash_add_del) (h, &kv, 1 /* is_add */ );
}
}
And changed 10 to 3.. that inserts 3003 elements.
And calling clib_format_bihash to print it, and I am seeing 2001 elements.
Could you please let me know how to build and run test_bihash_template.c .. so
that I can add a print routine there it self and try and can share the diffs
thanks
Vijay
From: "Dave Barach (dbarach)" <[email protected]<mailto:[email protected]>>
Date: Wednesday, August 8, 2018 at 3:41 PM
To: "Vijay Katamreddy (vkatamre)"
<[email protected]<mailto:[email protected]>>
Cc: "[email protected]<mailto:[email protected]>"
<[email protected]<mailto:[email protected]>>
Subject: RE: format_bihash not printing all the elements
No known issues at that level. Since this sounds like a test code, can you
share it?
Thanks... Dave
From: [email protected]<mailto:[email protected]>
<[email protected]<mailto:[email protected]>> On Behalf Of Vijayabhaskar
Katamreddy via Lists.Fd.Io
Sent: Wednesday, August 8, 2018 3:14 PM
To: [email protected]<mailto:[email protected]>
Cc: [email protected]<mailto:[email protected]>
Subject: [vpp-dev] format_bihash not printing all the elements
Hi,
I am add/search and experimenting with bihash, and when I use format_bihash to
print the keys/values.. active_elements count is printing incorrectly as well
not printing all the values.
I am inserting 3003 elements in 16_8 bihash, but only 2001 elements are
printed, any known issues?
I know that all the 3003 elements are in the list, as I am doing search, and
able to find the same in the same hash table
Thanks
Vijay
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#10103): https://lists.fd.io/g/vpp-dev/message/10103
Mute This Topic: https://lists.fd.io/mt/24232911/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-