Neo4j 3.5 Java embedded. How to increase heap size?
When using Neo4j embedded with Java how do I increase the size of the heap past 2 gigabytes?
I tried to increase it to 4 Gigabytes using
GraphDatabaseService graphDb = new GraphDatabaseFactory()
.newEmbeddedDatabaseBuilder(new File("C:\...\graph.db"))
.setConfig(GraphDatabaseSettings.pagecache_memory, "4096M")
.newGraphDatabase();
as noted in manual but this appears to have no effect on the size of the heap, e.g.
Max: 2,124,414,976 B in image below.
Details
In doing a uniform cost search or lowest cost first search requires retaining
- A list of each node visited
- A queue of the cost for each relationship not processed
In using Neo4j embedded with Java the application ends with
java.lang.OutOfMemoryError: GC overhead limit exceeded
To monitor the application running it is run with IntelliJ Community 2018.3 in debug mode with Visual VM 1.4.2.
The IntelliJ Plugin VisualVM Launcher is installed.
EDIT
This helps get past the problem for testing but still does not answer the question. It is posted here so that it can help others that find this question.
While I currently can not find a way increase the heap size for the JVM when creating a Neo4j graph with the Neo4j Java API, e.g.
new GraphDatabaseFactory()
or
new EnterpriseGraphDatabaseFactory()
when testing using IntelliJ
by creating the graph using
GraphDatabaseService graphDb = new GraphDatabaseFactory()
.newEmbeddedDatabase(new File("C:\...\graph.db"));
and using the Intellj Run/Debug Configurations Dialog
and editing VM options
by adding the JVM configuration options for starting heap size Xms
and maximum heap size Xmx
e.g.
-Xms4096m -Xmx4096m
the heap was increased during testing to 4,4294,967,296 B and the program completed as expected.
java neo4j heap-memory uniform-cost-search
add a comment |
When using Neo4j embedded with Java how do I increase the size of the heap past 2 gigabytes?
I tried to increase it to 4 Gigabytes using
GraphDatabaseService graphDb = new GraphDatabaseFactory()
.newEmbeddedDatabaseBuilder(new File("C:\...\graph.db"))
.setConfig(GraphDatabaseSettings.pagecache_memory, "4096M")
.newGraphDatabase();
as noted in manual but this appears to have no effect on the size of the heap, e.g.
Max: 2,124,414,976 B in image below.
Details
In doing a uniform cost search or lowest cost first search requires retaining
- A list of each node visited
- A queue of the cost for each relationship not processed
In using Neo4j embedded with Java the application ends with
java.lang.OutOfMemoryError: GC overhead limit exceeded
To monitor the application running it is run with IntelliJ Community 2018.3 in debug mode with Visual VM 1.4.2.
The IntelliJ Plugin VisualVM Launcher is installed.
EDIT
This helps get past the problem for testing but still does not answer the question. It is posted here so that it can help others that find this question.
While I currently can not find a way increase the heap size for the JVM when creating a Neo4j graph with the Neo4j Java API, e.g.
new GraphDatabaseFactory()
or
new EnterpriseGraphDatabaseFactory()
when testing using IntelliJ
by creating the graph using
GraphDatabaseService graphDb = new GraphDatabaseFactory()
.newEmbeddedDatabase(new File("C:\...\graph.db"));
and using the Intellj Run/Debug Configurations Dialog
and editing VM options
by adding the JVM configuration options for starting heap size Xms
and maximum heap size Xmx
e.g.
-Xms4096m -Xmx4096m
the heap was increased during testing to 4,4294,967,296 B and the program completed as expected.
java neo4j heap-memory uniform-cost-search
add a comment |
When using Neo4j embedded with Java how do I increase the size of the heap past 2 gigabytes?
I tried to increase it to 4 Gigabytes using
GraphDatabaseService graphDb = new GraphDatabaseFactory()
.newEmbeddedDatabaseBuilder(new File("C:\...\graph.db"))
.setConfig(GraphDatabaseSettings.pagecache_memory, "4096M")
.newGraphDatabase();
as noted in manual but this appears to have no effect on the size of the heap, e.g.
Max: 2,124,414,976 B in image below.
Details
In doing a uniform cost search or lowest cost first search requires retaining
- A list of each node visited
- A queue of the cost for each relationship not processed
In using Neo4j embedded with Java the application ends with
java.lang.OutOfMemoryError: GC overhead limit exceeded
To monitor the application running it is run with IntelliJ Community 2018.3 in debug mode with Visual VM 1.4.2.
The IntelliJ Plugin VisualVM Launcher is installed.
EDIT
This helps get past the problem for testing but still does not answer the question. It is posted here so that it can help others that find this question.
While I currently can not find a way increase the heap size for the JVM when creating a Neo4j graph with the Neo4j Java API, e.g.
new GraphDatabaseFactory()
or
new EnterpriseGraphDatabaseFactory()
when testing using IntelliJ
by creating the graph using
GraphDatabaseService graphDb = new GraphDatabaseFactory()
.newEmbeddedDatabase(new File("C:\...\graph.db"));
and using the Intellj Run/Debug Configurations Dialog
and editing VM options
by adding the JVM configuration options for starting heap size Xms
and maximum heap size Xmx
e.g.
-Xms4096m -Xmx4096m
the heap was increased during testing to 4,4294,967,296 B and the program completed as expected.
java neo4j heap-memory uniform-cost-search
When using Neo4j embedded with Java how do I increase the size of the heap past 2 gigabytes?
I tried to increase it to 4 Gigabytes using
GraphDatabaseService graphDb = new GraphDatabaseFactory()
.newEmbeddedDatabaseBuilder(new File("C:\...\graph.db"))
.setConfig(GraphDatabaseSettings.pagecache_memory, "4096M")
.newGraphDatabase();
as noted in manual but this appears to have no effect on the size of the heap, e.g.
Max: 2,124,414,976 B in image below.
Details
In doing a uniform cost search or lowest cost first search requires retaining
- A list of each node visited
- A queue of the cost for each relationship not processed
In using Neo4j embedded with Java the application ends with
java.lang.OutOfMemoryError: GC overhead limit exceeded
To monitor the application running it is run with IntelliJ Community 2018.3 in debug mode with Visual VM 1.4.2.
The IntelliJ Plugin VisualVM Launcher is installed.
EDIT
This helps get past the problem for testing but still does not answer the question. It is posted here so that it can help others that find this question.
While I currently can not find a way increase the heap size for the JVM when creating a Neo4j graph with the Neo4j Java API, e.g.
new GraphDatabaseFactory()
or
new EnterpriseGraphDatabaseFactory()
when testing using IntelliJ
by creating the graph using
GraphDatabaseService graphDb = new GraphDatabaseFactory()
.newEmbeddedDatabase(new File("C:\...\graph.db"));
and using the Intellj Run/Debug Configurations Dialog
and editing VM options
by adding the JVM configuration options for starting heap size Xms
and maximum heap size Xmx
e.g.
-Xms4096m -Xmx4096m
the heap was increased during testing to 4,4294,967,296 B and the program completed as expected.
java neo4j heap-memory uniform-cost-search
java neo4j heap-memory uniform-cost-search
edited Dec 31 '18 at 16:21
Guy Coder
asked Dec 28 '18 at 16:32
Guy CoderGuy Coder
15k43982
15k43982
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53961536%2fneo4j-3-5-java-embedded-how-to-increase-heap-size%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53961536%2fneo4j-3-5-java-embedded-how-to-increase-heap-size%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown