Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update cache_type default value #1681

Merged
merged 7 commits into from
Dec 9, 2021

Conversation

lxb1111
Copy link
Contributor

@lxb1111 lxb1111 commented Dec 7, 2021

No description provided.

@@ -5,9 +5,11 @@ gremlin.graph=com.baidu.hugegraph.HugeFactory
# cache config
#schema.cache_capacity=100000
# vertex-cache default is 1000w, 10min expired
vertex.cache_type=L2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expect l2(lowercase, not L2)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok,code has been updated and resubmitted

@@ -522,7 +522,7 @@ public static synchronized CoreOptions instance() {
"vertex.cache_type",
"The type of vertex cache, allowed values are [l1, l2].",
allowValues("l1", "l2"),
"l1"
"l2"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can also add some performance comparison results?

Copy link
Contributor Author

@lxb1111 lxb1111 Dec 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test plan:
通过配置不同的cache配置,然后启动server;准备好不同的数据集通过jmeter工具对server进行50并发的查询(ID查询点、ID查询边);观察GC变化、请求的延迟情况。

result:
1、10000w数据集情况下点、边查询从请求延迟时间、GC回收时间来看L2级缓存优于L1级缓存
2、10000w数据集情况下点、边查询L1级缓存延迟时间、GC回收时间都是随着缓存设置的递增呈现非线性递增,且变化明显
3、10000w数据集情况下点、边查询L2级缓存延迟时间随着缓存设置的递增没有明显太大变化,但是GC回收时间是整体趋势为增加的情况
image

@codecov
Copy link

codecov bot commented Dec 7, 2021

Codecov Report

Merging #1681 (1f04cbf) into master (3b623bc) will increase coverage by 0.55%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1681      +/-   ##
============================================
+ Coverage     66.20%   66.75%   +0.55%     
- Complexity     7022     7053      +31     
============================================
  Files           421      420       -1     
  Lines         34682    34668      -14     
  Branches       4804     4805       +1     
============================================
+ Hits          22960    23143     +183     
+ Misses         9379     9187     -192     
+ Partials       2343     2338       -5     
Impacted Files Coverage Δ
...n/java/com/baidu/hugegraph/config/CoreOptions.java 99.48% <ø> (ø)
...om/baidu/hugegraph/backend/cache/OffheapCache.java 79.88% <100.00%> (+22.05%) ⬆️
...om/baidu/hugegraph/backend/query/QueryResults.java 70.09% <0.00%> (-1.34%) ⬇️
.../com/baidu/hugegraph/type/define/SchemaStatus.java 80.00% <0.00%> (-0.96%) ⬇️
...java/com/baidu/hugegraph/schema/SchemaElement.java 77.14% <0.00%> (-0.33%) ⬇️
...c/main/java/com/baidu/hugegraph/util/LockUtil.java 84.93% <0.00%> (-0.21%) ⬇️
...in/java/com/baidu/hugegraph/StandardHugeGraph.java 68.47% <0.00%> (-0.20%) ⬇️
...du/hugegraph/schema/builder/IndexLabelBuilder.java 86.95% <0.00%> (-0.08%) ⬇️
...m/baidu/hugegraph/backend/tx/GraphTransaction.java 79.85% <0.00%> (-0.05%) ⬇️
...in/java/com/baidu/hugegraph/schema/IndexLabel.java 77.52% <0.00%> (ø)
... and 26 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3b623bc...1f04cbf. Read the comment docs.

@javeme
Copy link
Contributor

javeme commented Dec 7, 2021

there is ci error:

Error:  Tests run: 717, Failures: 0, Errors: 1, Skipped: 79, Time elapsed: 228.605 s <<< FAILURE! - in com.baidu.hugegraph.core.CoreTestSuite
Error:  testAddEdgeWithInvalidSortkey(com.baidu.hugegraph.core.EdgeCoreTest)  Time elapsed: 0.062 s  <<< ERROR!
java.lang.IllegalArgumentException: Can't contains byte '0x00' in string: '2017-5-27'
	at com.baidu.hugegraph.core.EdgeCoreTest.testAddEdgeWithInvalidSortkey(EdgeCoreTest.java:538)

@javeme javeme merged commit f6a492c into apache:master Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants