{"id":15993916,"url":"https://github.com/jexp/batchperformance","last_synced_at":"2025-04-05T00:15:10.014Z","repository":{"id":5160465,"uuid":"6330090","full_name":"jexp/batchperformance","owner":"jexp","description":"multi threaded batch-importer","archived":false,"fork":false,"pushed_at":"2012-10-31T02:34:46.000Z","size":224,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-10T08:29:58.461Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"Sable/heros","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jexp.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-22T05:47:22.000Z","updated_at":"2014-04-24T04:37:10.000Z","dependencies_parsed_at":"2022-07-06T04:01:51.072Z","dependency_job_id":null,"html_url":"https://github.com/jexp/batchperformance","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jexp%2Fbatchperformance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jexp%2Fbatchperformance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jexp%2Fbatchperformance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jexp%2Fbatchperformance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jexp","download_url":"https://codeload.github.com/jexp/batchperformance/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266566,"owners_count":20910836,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-08T07:03:14.007Z","updated_at":"2025-04-05T00:15:09.998Z","avatar_url":"https://github.com/jexp.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Parallel Batch inserter with Neo4j\n\nUses the [LMAX Disruptor](http://lmax-exchange.github.com/disruptor/) to parallelize operations during batch-insertion.\n\nThe 6 operations are:\n\n1. property encoding\n2. property-record creation\n3. relationship-id creation and forward handling of reverse relationship chains\n4. writing node-records\n5. writing relationship-records\n6. writing property-records\n\n\nDependencies:\n\n    (1)\u003c--(2)\u003c--(6)\n    (2)\u003c--(5)--\u003e(3)   \n    (2)\u003c--(4)--\u003e(3)   \n\nIt uses the above dependency setup of disruptor handlers to execute the different concerns in parallel. A ringbuffer of about 2^18 elements is used and a heap size of 5-20G, MMIO configuration within the heap limits.\n\nExecution:\n\n   MAVEN_OPTS=\"-Xmx5G -Xms5G -server -d64 -XX:NewRatio=5\"  mvn exec:java -Dexec.mainClass=org.neo4j.batchimport.DisruptorTest\n\ncurrent limitations, constraints:\n\n* only up to 2bn relationships (due to an int based multi-map)\n* have to know max # of rels per node, properties per node and relationship\n* relationships have to be pre-sorted by min(start,end)\n\n\nfuture improvements:\n\n* implement batch-importer CSV \"API\" on top of this\n* stripe writes across store-files (i.e. strip the relationship-record file over 10 handlers, according to CPUs)\n* parallelize writing to dynamic string and arraystore too\n* change relationship-record updates for backwards pointers to run in a separate handler that is\n  RandomAccessFile-based (or nio2) and just writes the 2 int values directly at file-pos\n* add a csv analyser / sorter that\n* add support \u0026 parallelize index addition\n* good support for index based lookup for relationship construction (kv-store, better in-memory structure, e.g. a collection of long[])\n* use id-compression internally to save memory in structs (write a CompressedLongArray)\n* reuse PropertyBlock, PropertyRecords, RelationshipRecords, NodeRecords, probably subclass them and override getId() etc. or copy the code\n  from the Store's to work with interfaces","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjexp%2Fbatchperformance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjexp%2Fbatchperformance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjexp%2Fbatchperformance/lists"}