Commit graph

247 commits

Author SHA1 Message Date
martinsumner
afb28aa7d6 Switch iterator scan width to macro
And 4 seems a more reasonable number than 1
2016-12-29 10:21:57 +00:00
martinsumner
c3999110e2 Remove io:format from debugging 2016-12-29 02:47:21 +00:00
Martin Sumner
18f2b5660d Fix to ensure directory structure created 2016-12-29 02:31:10 +00:00
martinsumner
dc28388c76 Removed SFT
Now moved over to SST on this branch
2016-12-29 02:07:14 +00:00
Martin Sumner
676e8fa494 Add Get Timing 2016-12-22 15:45:38 +00:00
martinsumner
130fb36ddd Add head timings
Include log breaking down timings of HEAD requests by result and level
2016-12-22 14:03:31 +00:00
martinsumner
b2835aeaec Improve fetching efficiency
Experiment to see if parsing all keys in block can be avoided - and if
so does this make the range scan more efficient.

Unproven change.
2016-12-21 18:28:14 +00:00
martinsumner
be775127e8 Improve logging of merge activity and slow GETs
Look into speculation that collisions between fetch_rnage and fetch may
be an issue
2016-12-21 12:45:27 +00:00
martinsumner
cf6a1eb513 Add extra bloom check
Add extra bloom check - but get the SFT process to perform not the chekc
not the Penciller.  This avoids complexity of negotiating the transfer
of the bloom to the Penciller - but doesn't avoid the potentially
unecessary message pass between processes.
2016-12-12 18:01:37 +00:00
martinsumner
86bdfdeaf0 Reverted back out the additional bloom check
This is desirable to add back in going forward, but wasn't implemented
in a safe or clear way.

The way the bloom was or was not on the LoopState was clumsy, and it got
persisted in multiple places without a CRC check.

Intention to implement back in wherby it is requested on-demand by the
Penciller, and then the SFT worker lifts it off disk and CRC checks it.
So it is never on the SFT LoopState.  Also it will be easier to control
the logic over which levels have the bloom in the Penciller.
2016-12-11 21:01:10 +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
2758498fad More Jitter!
Having reduced the size of the ledger cache (again) we can now tolerate
more jitter here
2016-12-11 06:54:41 +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
f848500eff Tinker, tinker, tinker, tinker 2016-12-11 04:53:36 +00:00
martinsumner
523716e8f2 Add tiny bloom to Penciller Manifest
This is an attempt to save on unnecessary message transfers, and
slightly more expensive GCS checks in the SFT file itself.
2016-12-11 04:48:50 +00:00
martinsumner
ea8f3c07a7 oops 2016-12-11 02:00:19 +00:00
martinsumner
2c7fdc74d4 Setting fiddling
Try to find a happy medium
2016-12-11 01:58:25 +00:00
martinsumner
5d11bc051f Allow for more fluctuation in L0 write time
Try to alleviate existing co-ordination issue when all vnodes tend to
try and write L0 files concurrently
2016-12-11 01:49:03 +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
626a8e63f9 Experiment converting CDB to use skiplist not gb_tree
Might insertion time be faster?
2016-12-10 10:55:35 +00:00
martinsumner
d2bd01eaf1 Add fast fail to skiplist
Add a bloom filter to the skiplist, to make it faster at returning not
found.  The SkipList is now encapsulated within a dict().
2016-12-09 18:30:40 +00:00
martinsumner
f0db730f07 Adjust jitter settings 2016-12-09 16:34:15 +00:00
martinsumner
82cb49638a Attempt at performance improvement
Try to add some extra jitter in to the process of L0 writes, and also
make L0 writes delayed to help with bufferring
2016-12-09 14:36:03 +00:00
Martin Sumner
fe080895fd Revert type definition
Can’t find a type definition support din both OTP 16 and OTP 18, so
reverting to not defining type
2016-11-25 18:22:35 +00:00
Martin Sumner
ec32a7e3eb OTP16 compliance - array type 2016-11-25 18:20:17 +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
638fc69e01 Correctly set array type
Otherwise cannot compile in both OTP 16 and 17
2016-11-21 22:26:12 +00:00
martinsumner
0f7e421371 Add destruction
Allow a store to be cleared out and destroyed
2016-11-21 12:34:40 +00:00
martinsumner
386d40928b Fast List Buckets
Copied the technique from HanoiDB to speed up list buckets.
2016-11-20 21:21:31 +00:00
martinsumner
f40ecdd529 Pick-up test misses
There were some coverage misses in tests, so check in unit test coverage
or remove branches not currently needed.
2016-11-18 21:35:45 +00:00
martinsumner
8cbe2ef93a Coverage cheats
You juke the stats, and majors become colonels.  I've been here before
2016-11-14 20:43:38 +00:00
martinsumner
630f802780 Inker Close nastiness
Try to stop some of the potential deadlocking around Inker close and
prove that snapshots at higher Manifest SQNs can be ignored
2016-11-14 19:34:11 +00:00
martinsumner
75d6af75c6 Penciller review
The penciller attempt to close the L0 file if pending was unpredictable
in behaviour.  If a L0 file is still pending it will be lost - but this
is at least a predictable event.
2016-11-14 17:18:28 +00:00
martinsumner
8035583301 Comment review 2016-11-07 11:17:13 +00:00
martinsumner
4583460328 Clean API of Riak-specific Methods
Clena the API of Riak specific methods, and also resolve timing issue in
simple_server unit test.  Previously this would end up with missing data
(and a lower sequence number after start) because of the penciller_clerk
timeout being relatively large in the context of this test.  Now the
timeout has bene reduced the L0 slot is cleared by the time of the
close.  To make sure an extra sleep has been added as a precaution to
avoid any intermittent issues.
2016-11-07 10:11:57 +00:00
Martin Sumner
a7ed3e4b85 Trim dead branches
Also an experiment with altering the slowoffer_delay.
2016-11-05 15:59:31 +00:00
martinsumner
a73c233154 Correct the recording of excess work 2016-11-05 15:10:21 +00:00
martinsumner
376176eba3 Correct overlap in naming with Backlog 2016-11-05 14:35:01 +00:00
martinsumner
7f456fa993 Add back-pressure on work queue limit
Previously under heavy load, as long as L0 was being cleared, the ledger
woud keep accapting.  Now there is a formla limit on how far behind the
work queue (of compactions required at other levels) before the break is
applied on new updates coming in).
2016-11-05 14:04:45 +00:00
martinsumner
4556573a5c Rationalise logging on push_mem 2016-11-05 13:42:44 +00:00
martinsumner
87b5bd0b18 Set Persisted SQN (regression)
As part of previous change had stopped setting the persisted SQN in the
ledger - which stopped journal compaction from working)
2016-11-05 12:03:21 +00:00
martinsumner
61c6269200 Penciller back-pressure - Phase 1
There were issues with how the Penciller behaves under ehavy write
pressure - most particularly where there are a large number of keys per
update (i.e. 2i heavy objects).   Most immediately the attempt to chekc
whether the l0 file was ready slowed down the process of producing the
L0 file - so back-pressure created more back-pressure.

Going forward want to alter this most significantly as also the work
queue can build up unsustainably. there needs to be some pausing
prompted by the bookie on 'returned', and the use of 'returend when the
work queue exceeds a threshold.
2016-11-05 11:22:27 +00:00
martinsumner
41f00ba6fa Filename nonsense 2016-11-03 20:48:23 +00:00
martinsumner
dd99d624b1 Tangling with filenames
filename join does not work as expected
2016-11-03 20:46:56 +00:00
martinsumner
c3a6489b93 Ensure manifest dir when starting Penciller
Otherwise may fail based on test ordering
2016-11-03 20:09:38 +00:00
martinsumner
d5ac4d412d Use filename join
Potentiall to avoid *nix vs windows differences
2016-11-03 20:06:30 +00:00
martinsumner
341e245c09 Remove unnecessary no match condition 2016-11-03 19:34:54 +00:00
martinsumner
2716d912ea Timeout and close race
Race condition presvented in test - but still not handled nicely.
Perhaps need to consider making it a FSM and handling close differently
when L0 pending - i.e. don't close immediately, but set a timeout to
close on if we don't get the last fetch_levelzero
2016-11-03 19:02:50 +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