Commit graph

27 commits

Author SHA1 Message Date
Heinz N. Gies
25389893cf Add compatibility for old and new random / rand functions 2017-08-01 11:24:12 +02:00
Martin Sumner
fd84e4f608 Test timeouts
So that coverage testing will run.
2017-07-02 22:23:02 +01:00
martinsumner
afbf918f2c Change from using array type
Won't compile in OTP16
2017-06-01 21:37:23 +01:00
martinsumner
c073344163 Dialyzer helper
Add specs and docs to external API
2017-05-30 15:36:50 +01:00
martinsumner
ed96d0ca7a Change so that type of cache is parameterised
The Tree doesn't seem to be better than the skiplist.  Get ready to make
this switchable
2017-01-21 11:38:26 +00:00
martinsumner
3d99036093 Switch the LM1 cache to be a tree
Use a tree of lists not a skiplist
2017-01-20 16:36:20 +00:00
martinsumner
83be8041f0 Update comments to reflect changes 2017-01-06 10:09:15 +00:00
martinsumner
24ec918eb1 Handle no-lookup hash in retain strategy 2017-01-05 22:42:59 +00:00
martinsumner
5a88565c08 Switch to binary index in pmem
Remove the ets index in pmem and use a binary index instead.  This may
be slower, but avoids the bulk upload to ets, and means that matches
know of position (so only skiplists with a match need be tried).

Also stops the discrepancy between snapshots and non-snapshots - as
previously the snapshots were always slowed by not having access to the
ETS table.
2017-01-05 21:58:33 +00:00
martinsumner
fb069666dc Export module 2016-12-11 08:16:00 +00:00
martinsumner
6f06c6fdeb ETS delete
Delete the objects rather than starting a new table each time
2016-12-11 07:07:30 +00:00
martinsumner
8bcb49479d Re-introduce ETS Index
Add ETS Index back in to avoid having to check each skip list in turn.
Also this helps keep a lower skip list size.
2016-12-11 05:23:24 +00:00
martinsumner
2d3a40e6f1 Magic Hash - and no L0 Index
Move to using the DJ Bernstein Magic Hash consistently, and trying to
make sure we only hash once for each operation (as the hash is more
expensive than phash2).

The improved lookup time for missing keys should allow for the L0 index
to be removed, and hence speed up the completion time for push_mem
operations.

It is expected there will be a second stage of creating a tinybloom as
part of the SFT creation process, and then adding that tinybloom to the
manifest.  This will then reduce the message passing required for a GET
not in the cache or higher levels
2016-12-11 01:02:56 +00:00
martinsumner
95d5e12ce7 Switch to using ets set as index of L0 cache
Hope is that this will cause less garbage collection, and also will be
slightly faster.

Note that snapshots don't now get an index - they get the special index
'snap'.  However, the SkipLists have bloom protection, and most
snapshots are iterators not fetchers.
2016-12-10 14:15:35 +00:00
martinsumner
03d025d581 Replace ledger-side gb_trees
Try to make minimal change to replace gb_trees with gb_tree API-like
skiplists
2016-11-25 14:50:13 +00:00
martinsumner
c9afe34fea Missing key tming test 2016-11-24 23:31:13 +00:00
martinsumner
54eedb8282 Add out of range tests for skiplist range 2016-11-24 23:22:19 +00:00
martinsumner
3bbfd8b923 Tighten SkipList range
Make SkipList range accurate - trim the edges
2016-11-24 23:09:17 +00:00
martinsumner
2d3b1bbf2c Ongoing work on skip lists
Initial rough implementation with some timing tests
2016-11-24 20:16:41 +00:00
martinsumner
96b9e1faa3 Initial Commit for SkipLists
To speed check on alternate platform
2016-11-22 23:21:47 +00:00
martinsumner
f41c788bff Minor quibbles
Move legacy CDB code used only in unit tests into test area.  Fix column
width in  pmem and comment out the unused case statement (in healthy
tests) from the penciller test code
2016-11-03 16:46:25 +00:00
martinsumner
37e20ccdfe L0 cache size counter improved
This is now accurate save for hash collisions.  It may now be a small
under-estimate, whereas previously it could be a large over-estimate.
2016-11-03 16:22:51 +00:00
martinsumner
4e46c9735d Log improvements
Continuation of log review and conversion to using central log function.

Fixup of convoluted shutdown process between Bookie, Inker and Inker's
Clerk
2016-11-03 16:05:43 +00:00
martinsumner
4cffecf2ca Handle gen_server:cast slowness
There was some unpredictable performance in tests, that was related to
the amount of time it took the sft gen_server to accept a cast whihc
passed the levelzero_cache.

The response time looked to be broadly proportional to the size of the
cache - so it appeared to be an issue with passing the large object to
the process queue.

To avoid this, the penciller now instructs the SFT gen_server to
callback to the server for each tree in the cache in turn as it is
building the list from the cache.  Each of these requests should be
reltaively short, and the processing in-between should space out the
requests so the Pencille ris not blocked from answering queries when
pompting a L0 write.
2016-10-31 01:33:33 +00:00
martinsumner
95609702bd Penciller Memory Refactor
Plugged the ne wpencille rmemory into the Penciller, and took advantage
of the increased speed to simplify the callbacks involved.

The outcome is much simpler code
2016-10-30 18:25:30 +00:00
martinsumner
c7a56068c5 Refactor of L0 memory
Not yet integrated, but there is now unit-tested module for the new way
of managing L0 memory cache in the Penciller.

This mechansim is considerably more efficient than previous efforts and
should allow for further simplification of the code.
2016-10-29 13:27:21 +01:00
martinsumner
807af81b68 Pneciller Memory Test
The current penciller memory setup is inefficient.  Is there an
alternative which is still relatively simple and but more efficient?
2016-10-29 01:06:00 +01:00