# Memory config for loading data

**URL:** <https://community.neo4j.com/t/memory-config-for-loading-data/59540>\
**Category:** Neo4j Graph Platform\
**Tags:** migrated\
**Created:** [September 18, 2022, 4:13pm UTC](https://community.neo4j.com/t/memory-config-for-loading-data/59540 "2022-09-18T16:13:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![redha\_benhisse1](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/redha_benhisse1/32/4969_2.png) [@redha\_benhisse1](https://community.neo4j.com/u/redha_benhisse1)\
**Post date:** [September 18, 2022, 4:13pm UTC](https://community.neo4j.com/t/memory-config-for-loading-data/59540/1 "2022-09-18T16:13:09Z")

</div>

Hello

I need help please

I am loading the ssb (star schema benchmark) data onto a neo4j database. For I am using the script "using period commit ...... load csv ...." from files I generated from the ssb database.

However, one of the files contains 23 million lines and it takes too long.

I have a 64GB ram virtual machine on ubuntu and I have configured my neo4j.conf as follows:

dbms.memory.heap.initial\_size=40960m  
dbms.memory.heap.max\_size=40960m

dbms.memory.pagecache.size=20480m

I would like to know if you can give me an optimal configuration to speed up the loading.

thank you in advance

redha

[Translated with DeepL](https://www.deepl.com/translator?utm_source=windows&utm_medium=app&utm_campaign=windows-share)

---

<div class="post-metadata">

**Author:** ![Cobra](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/cobra/32/35243_2.png) [@Cobra](https://community.neo4j.com/u/Cobra)\
**Post date:** [September 18, 2022, 7:00pm UTC](https://community.neo4j.com/t/memory-config-for-loading-data/59540/2 "2022-09-18T19:00:21Z")

</div>

Hello [@redha\_benhisse1](https://community.neo4j.com/t5/user/viewprofilepage/user-id/2735) 😀

For large CSV files, you should use [neo4j-admin import](https://neo4j.com/docs/operations-manual/current/tutorial/neo4j-admin-import/).

Moreover, do you have [unique constraints](https://neo4j.com/docs/cypher-manual/current/constraints/) on your nodes?

Finally, you can use [neo4j-admin memrec](https://neo4j.com/docs/operations-manual/current/tools/neo4j-admin/neo4j-admin-memrec/) to help you configure the database memory.

Regards,  
Cobra

---

<div class="post-metadata">

**Author:** ![redha\_benhisse1](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/redha_benhisse1/32/4969_2.png) [@redha\_benhisse1](https://community.neo4j.com/u/redha_benhisse1)\
**Post date:** [September 23, 2022, 7:17pm UTC](https://community.neo4j.com/t/memory-config-for-loading-data/59540/3 "2022-09-23T19:17:38Z")

</div>

Hi

neo4j-admin import resolve my problem

Thank u v m
