Commit Graph

1282 Commits

Author SHA1 Message Date
florijan
14064926b6 plan::OrderBy - use vector instead of list
Summary: Reduces latency on LDBC query 9 from 7.9sec to 6.8sec (14%). That query has 650k rows in ORDER BY, 3 ordering elements and 10ish values get returned (both of them are now accumulated into vectors).

Reviewers: buda, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D775
2017-09-11 14:11:33 +02:00
Teon Banek
35f726dfd2 Use EdgeType in Expand and ExpandVariable
Summary:
Add function First to utils.
Insert EdgeType into Expand during planning.

Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D769
2017-09-11 11:16:04 +02:00
Marko Budiselic
8aa4b5aa74 Don't do commit on cherry-pick during fmt lib setup.
Summary: Don't do commit on cherry-pick during fmt lib setup.

Reviewers: mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D774
2017-09-09 17:52:20 +02:00
Mislav Bradac
74d0a426ab Use \u for utf16 and \U for utf32
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D773
2017-09-09 16:16:30 +02:00
Teon Banek
92b9bbd4bd Remove const requirement from DbAccessor in planning
Summary: The constness of the DbAccessor interferes with caching the results.

Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D771
2017-09-09 14:06:32 +02:00
Teon Banek
0aee18544d Add caching VerticesCount during planning and estimation
Summary:
Benchmark planning and estimating indexed ScanAll. According to the benchmark,
caching speeds up the whole process of planning and estimation by a factor of
2. Most of the performance gain is in the `CostEstimator` itself, due to plenty
of calls to `VerticesCount` when estimating all of the generated plans.

Reviewers: mislav.bradac, florijan

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D765
2017-09-09 12:26:48 +02:00
Teon Banek
f0b1f24006 unit.recovery: Read vertex IDs into int64_t, not int
Summary:
This fixes the problem when the test would fail on some PCs...
Notably, mine...

Reviewers: florijan, mferencevic, mislav.bradac, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D770
2017-09-09 09:24:42 +02:00
Matej Ferencevic
541a0dae24 Addded query error message to harness client.
Reviewers: florijan

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D766
2017-09-08 15:30:58 +02:00
florijan
2c4966edfe Vertex edges data structure introduced
Summary:
- The `Edges` data structure now handles common ops, including providing an iterator over edges whose "other" vertex is know.
- This should improve performance on dense_expand tests in the harness without other side-effects.
- query::plan::Expand operator modified not to check for existing-node stuff since that now gets handled by the `Edges` data structure.
- `Edges::Iterator` implemented only for const iterators since that suffices for now. Can implement non-const if the need arrises.

Reviewers: buda, mislav.bradac, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D763
2017-09-08 13:21:21 +02:00
florijan
9f8361dd27 Edge storage benchmark added
Summary: For the time being we'll go with vector and a custom iterator for know-destination-vertex lookups, but this benchmark might be handy to keep for future work.

Reviewers: buda, mislav.bradac, teon.banek

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D762
2017-09-08 13:12:20 +02:00
florijan
5066b1b80d BuildIndex now iterates over less vertices
Summary:
Measured improvements in a test scenario with 4 labels, 1M vertices for each label:
Old code: ~2.5 seconds per index
New code: ~1.5 seconds per index

When building an index for a non-existing label the updated code is done immediately. The old code depends on the number of vertices in the database.

The new code *could* be slower when building an index for a label that has a lot of vertices, and the index is not garbage collected recently and contains a lot of junk. This can be avoided by a simple check in the `BuildIndex` function (if label_index cardinality > total cardinality), if you like.

Reviewers: buda, mislav.bradac, teon.banek

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D767
2017-09-08 13:05:09 +02:00
florijan
6edf2cc5ab BFS feature test that uses edges added
Reviewers: buda, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D768
2017-09-08 13:03:57 +02:00
Matej Ferencevic
21782901c1 Added 3 iterations to macro benchmark.
Reviewers: mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D759
2017-09-08 11:23:25 +02:00
Teon Banek
c8d34c58ef Generate indexed ScanAll to make Expand existing
Summary: Test generating ScanAll before expand to use existing

Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Subscribers: buda, lion, pullbot

Differential Revision: https://phabricator.memgraph.io/D746
2017-09-08 09:50:18 +02:00
florijan
63966c15a6 LDBC Query1 converted
Summary: Ugly formatting and bad variable naming due to 1024 limit on neo4j client.

Reviewers: buda, teon.banek

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D748
2017-09-08 09:30:22 +02:00
Mislav Bradac
38c83d80cb Rename Executioner to Executor
Reviewers: buda, florijan

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D764
2017-09-07 15:13:17 +02:00
florijan
be16409da2 Harness MATCH tests refactored
Summary:
1. Test setup rewritten to take cca 8 seconds. Note that edges are created by using:
`MATCH (a) WITH a MATCH (b) WITH b WHERE rand() < X CREATE (a)-[:ET]->(b)`
Where `X` is a threshold calculated so the desired edge count is the expectation. This seems the only feasable way of generating a large number of edges since query execution does not depend on edge count, but on vertex count.

2. Using the new `assert` function to verify graph state. I recommend doing that in all the harness tests (I don't think we currently have something better).

3. All tests rewritten to take around 200ms per iteration.

4. Test are using SKIP to avoid sending data to the client, but ensure that appropriate operations get executed. This currently seems like the best way of removing unwanted side-effects.

Harness will cost us our sanity. And it doesn't even provide good quality regression testing we really need :(

Reviewers: buda, mislav.bradac, mferencevic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D752
2017-09-07 12:05:05 +02:00
Teon Banek
020afd7f4b ldbc: Use a part of the query name for x-tick labels
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D761
2017-09-07 11:57:58 +02:00
florijan
0227eae88a GBench plot tool improvement
Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D760
2017-09-07 11:24:03 +02:00
Teon Banek
1693530d92 ldbc: Separate running short reads from updates
Reviewers: buda

Reviewed By: buda

Subscribers: mferencevic, pullbot

Differential Revision: https://phabricator.memgraph.io/D758
2017-09-07 10:45:09 +02:00
Marko Budiselic
db028221ae Workin progress. v0.7.0 docs update + update script.
Summary: Map literals are removed from user tech upcoming features.

Reviewers: mferencevic, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D671
2017-09-07 09:46:55 +02:00
Matej Ferencevic
6a1f083370 Added parameters to query logging.
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D757
2017-09-06 16:48:09 +02:00
florijan
51ba4727bf Gbench plot tool added
Summary: See script docs.

Reviewers: buda, teon.banek, mislav.bradac

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D755
2017-09-06 15:51:49 +02:00
Matej Ferencevic
f848394e5d Fixed bolt chunked encoder buffer for big data.
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D756
2017-09-06 15:36:24 +02:00
Matej Ferencevic
642c2f07bb Added PostgreSQL support to harness client.
Reviewers: mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D753
2017-09-06 15:22:25 +02:00
florijan
cd0d8eb543 Harness - dense expand group added, more tests on bench
Summary: It turns out trivial if I use unwind for vertex creation, MATCH for edge creation and UNWIND for test duration. It took hours to converge to this :(

Reviewers: mislav.bradac, buda

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D747
2017-09-06 14:58:50 +02:00
Matej Ferencevic
4d4dbc245d Reduced libs/setup.sh wget verbosity.
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D754
2017-09-06 13:39:54 +02:00
Matej Ferencevic
8cf69738bf Fixed bolt decoder chunked buffer implementation.
Summary:
Bolt client now uses new chunked decoder.

Fixed bolt session to use new chunked decoder.

Fixed chunked decoder buffer test.

Fixed bolt session test.

Removed debug message from client.

Fixed bolt encoder to comply with specification.

Reviewers: buda, mislav.bradac

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D751
2017-09-06 13:19:42 +02:00
florijan
4975743f35 Assert function added
Summary: `assert` function added. Useful to us for asserting DB state in harness tests. Potentially useful to the client for breaking out of a query as soon as a predicate fails, as opposed to collecting result and checking them client-side.

Reviewers: buda, mislav.bradac, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D750
2017-09-05 13:57:56 +02:00
Matej Ferencevic
21eba052ae Added link to memgraph to macro benchmark parent run.
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D749
2017-09-05 10:22:25 +02:00
Matej Ferencevic
70d9f3f6f1 Refactored harness and added PostgreSQL support.
Summary:
Moved Neo4j config to config dir.

Neo4j and PostgreSQL are now downloaded to libs.

Renamed metadata flags in memgraph.

Changed apollo generate for new harness.

Reviewers: mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D741
2017-09-05 09:45:41 +02:00
Marko Budiselic
b30e3252e2 A python script that visualizes latency results from LDBC.
Summary:
  * extension of run_benchmark script
  * tools/plot_latency.py

Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: mislav.bradac, pullbot

Differential Revision: https://phabricator.memgraph.io/D743
2017-09-04 16:36:42 +02:00
Mislav Bradac
c56621682e Parse utf16 surrogate codepoints correctly
Reviewers: buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D745
2017-09-04 16:03:45 +02:00
Teon Banek
d584a7b18b Test ExpandVariable reverses on Direction::BOTH
Summary: Add `is_flipped` to `Expansion`

Reviewers: florijan, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D744
2017-09-04 15:35:17 +02:00
Matej Ferencevic
65c6b50ade Removed query logging in release mode.
Reviewers: mislav.bradac, buda

Reviewed By: mislav.bradac, buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D742
2017-09-04 13:37:20 +02:00
florijan
f68bac922f Map indexing added
Reviewers: mislav.bradac, buda

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D739
2017-09-04 09:12:46 +02:00
Matej Ferencevic
9eac85c9fb Crash with a meaningful message when the snapshot directory is a file.
Reviewers: buda, florijan

Reviewed By: buda, florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D728
2017-09-03 20:39:19 +02:00
florijan
75ccdc8dca TypedValue refactor
Reviewers: mislav.bradac

Reviewed By: mislav.bradac

Differential Revision: https://phabricator.memgraph.io/D738
2017-09-02 14:25:46 +02:00
florijan
21550d3bb1 LDBC queries checked
Summary:
- checked existing queries and added new ones
- minor changes to LDBC setup

Reviewers: teon.banek, buda

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D737
2017-09-02 10:36:02 +02:00
Teon Banek
7294f7812e csv_to_snapshot: Treat empty csv field as null
Reviewers: florijan, mislav.bradac, buda

Reviewed By: florijan

Differential Revision: https://phabricator.memgraph.io/D736
2017-09-01 14:30:59 +02:00
florijan
0a5e9256f1 ExpandBreadthFirst can also have optional input
Reviewers: teon.banek

Reviewed By: teon.banek

Differential Revision: https://phabricator.memgraph.io/D735
2017-09-01 14:14:23 +02:00
Teon Banek
77e574fcc5 Cleanup some errors in ldbc setup scripts
Summary:
Don't require setup_system to run as root, nor apt-get
Implement command_fail for ldbc/setup_dependencies
ldbc.setup_dataset: Find Java on ArchLinux

Reviewers: buda, mferencevic

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D729
2017-09-01 14:13:34 +02:00
Teon Banek
26297ca641 ldbc: Extract update queries
Summary:
Convert update queries to oC supported by MG
Ignore ve2 in ldbc

Reviewers: buda, mislav.bradac, florijan

Reviewed By: buda

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D733
2017-09-01 14:13:04 +02:00
Mislav Bradac
2111612fc8 Run Neo on ramdisk in harness
Reviewers: mferencevic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D734
2017-09-01 12:04:42 +02:00
florijan
7f40607dd3 TypedValue test and implementation improvements
Summary: Some TypedValue arithmetic ops threw exceptions for the wrong reasons, the op applicability type checks were wrong. Also the tests for that behavior were wrong. These are the fixes.

Reviewers: mislav.bradac, buda

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D724
2017-09-01 11:21:32 +02:00
Mislav Bradac
bba5d134c0 Refactor harness
Reviewers: mferencevic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D732
2017-08-31 11:23:11 +02:00
Matej Ferencevic
24b52270e4 Converted macro benchmark summary from seconds to milliseconds.
Reviewers: mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D730
2017-08-31 11:12:05 +02:00
Teon Banek
1e87f888ae Correctly transform exists to is not null check
Reviewers: buda, mislav.bradac

Reviewed By: mislav.bradac

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D731
2017-08-31 09:01:21 +02:00
Teon Banek
52709ad04c Inline filter inside ExpandVariable
Summary:
Reorder class definition in ast.hpp.
Test inlining filters in ExpandVariable.

Reviewers: florijan, mislav.bradac

Reviewed By: florijan

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D726
2017-08-30 16:23:16 +02:00
Mislav Bradac
e68f7ea536 Use median instead of avg in harness
Reviewers: mferencevic

Reviewed By: mferencevic

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D725
2017-08-30 15:28:30 +02:00