Home Database Mysql Tutorial NEO4J数据插入测试

NEO4J数据插入测试

Jun 07, 2016 pm 03:56 PM
2.4ghz cpu neo4j Memory insert data test

CPU: I3 2.4Ghz 4核,内存8G 方式一:采用其原生接口操作 JVM:-Xms1024m -Xmx1024m -Xmn512m-XX:PermSize=128m -XX:MaxPermSize=256m 4000节点(50个属性),4000关系:1秒,其间cpu使用率25%,761M 8000节点(50个属性),8000关系:2秒,其间cpu使用率25%,82

CPU: I3 2.4Ghz 4核,内存8G
方式一:采用其原生接口操作

JVM:-Xms1024m -Xmx1024m -Xmn512m-XX:PermSize=128m -XX:MaxPermSize=256m

4000节点(50个属性),4000关系:1秒,其间cpu使用率25%,761M

8000节点(50个属性),8000关系:2秒,其间cpu使用率25%,829M

16000节点(50个属性),16000关系:5秒,其间cpu使用率25,983M

24000节点(50个属性),24000关系:9秒,其间cpu使用率25%,1079M

32000节点(50个属性),32000关系:14秒,其间cpu使用率25%,1187M

40000节点(50个属性),40000关系:执行1多分钟以后直接报outOfMemery: java heap space

内存使用:

\

结论:插入时用事务插入接口的话,在JVM 1G内存的配置下最后能够插入3万多个节点和关系,再多就内存溢出。

方式二:采用BatchInserter接口

JVM:采用JVM默认设置

40000节点(50个属性),40000关系:6秒,其间CPU使用率25%,内存288M

80000节点(50个属性),80000关系:17秒,其间CPU使用率25%,内存288M

120000节点(50个属性),120000关系:31秒,其间CPU使用率25%,内存289M

200000节点(50个属性),200000关系:56秒,其间CPU使用率25%,内存288M

分析:

根据官方文档,当少量数据(根据测试观察5000条以下)插入时,建议使用事务型插入接口(即通常NEO4J的数据操作接口),速度还是可以的;当数据量比较大时,建议采用专用的BatchInserters接口,这个接口在插入时不创建事务,估计内存占用很少,基本上在不同数据量的操作期间内存无太大变化。由此可见,在向NEO4J导入大量数据时,可以有以下两种方法实现快速插入:

化大为小法

此法是将大量的数据集合分成5000条或者更少集合,使用事务型插入接口插入数据,这样整体的插入时间按照以上的测试结果,100000条数据可以在30秒内插入完毕。缺点是需要分拆数据集合为小的集合;优点是当用户已经在运行一组NEO4J的数据库时,只需改造相关的代码即可,也不需要在导入期间暂停数据库。

批量插入法

此法不管数据量多大,都可以实现快速插入,实现速度和内存的平衡,适合在初始化数据库时(或者需要大量导入数据时)一次性导入大量的数据;缺点是导入数据时要暂停数据库,采用BatchInserters接口导入,不能实现业务无中断运行。

建议:

采用化大为小法,当插入(导入)数据量大于1000个时,采用分批插入的方法,可以达到快速插入数据的目的,也能保证内存占用量不会有太大的变化而导致OOM。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Large memory optimization, what should I do if the computer upgrades to 16g/32g memory speed and there is no change? Large memory optimization, what should I do if the computer upgrades to 16g/32g memory speed and there is no change? Jun 18, 2024 pm 06:51 PM

For mechanical hard drives or SATA solid-state drives, you will feel the increase in software running speed. If it is an NVME hard drive, you may not feel it. 1. Import the registry into the desktop and create a new text document, copy and paste the following content, save it as 1.reg, then right-click to merge and restart the computer. WindowsRegistryEditorVersion5.00[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SessionManager\MemoryManagement]"DisablePagingExecutive"=d

144-core, 3D-stacked SRAM: Fujitsu details next-generation data center processor MONAKA 144-core, 3D-stacked SRAM: Fujitsu details next-generation data center processor MONAKA Jul 29, 2024 am 11:40 AM

According to news from this website on July 28, foreign media TechRader reported that Fujitsu introduced in detail the FUJITSU-MONAKA (hereinafter referred to as MONAKA) processor planned to be shipped in 2027. MONAKACPU is based on the "cloud native 3D many-core" architecture and adopts the Arm instruction set. It is oriented to the data center, edge and telecommunications fields. It is suitable for AI computing and can realize mainframe-level RAS1. Fujitsu said that MONAKA will achieve a leap in energy efficiency and performance: thanks to technologies such as ultra-low voltage (ULV) technology, the CPU can achieve 2 times the energy efficiency of competing products in 2027, and cooling does not require water cooling; in addition, the application performance of the processor It can also reach twice as much as your opponent. In terms of instructions, MONAKA is equipped with vector

Leak reveals key specs of Intel Arrow Lake-U, -H, -HX and -S Leak reveals key specs of Intel Arrow Lake-U, -H, -HX and -S Jun 15, 2024 pm 09:49 PM

IntelArrowLakeisexpectedtobebasedonthesameprocessorarchitectureasLunarLake,meaningthatIntel'sbrandnewLionCoveperformancecoreswillbecombinedwiththeeconomicalSkymontefficiencycores.WhileLunarLakeisonlyavailableasava

AM4 refuses to die, news says AMD will launch Ryzen 9 5900XT/7 5800XT: clocked at up to 4.8GHz AM4 refuses to die, news says AMD will launch Ryzen 9 5900XT/7 5800XT: clocked at up to 4.8GHz Jun 05, 2024 pm 09:43 PM

According to news from this website on June 1st, the source @CodeCommando tweeted today, sharing some screenshots of AMD’s upcoming presentation documents at the Computex2024 event. The content of the tweet was “AM4 will never die”, and the accompanying picture showed two new Ryzen5000XT series processors. The screenshots show the following two products: Ryzen 95900 Ryzen75800XT It is a faster variant of AMD's existing Ryzen75800X processor. Both processors are clocked up to 4.8G

Sources say Samsung Electronics and SK Hynix will commercialize stacked mobile memory after 2026 Sources say Samsung Electronics and SK Hynix will commercialize stacked mobile memory after 2026 Sep 03, 2024 pm 02:15 PM

According to news from this website on September 3, Korean media etnews reported yesterday (local time) that Samsung Electronics and SK Hynix’s “HBM-like” stacked structure mobile memory products will be commercialized after 2026. Sources said that the two Korean memory giants regard stacked mobile memory as an important source of future revenue and plan to expand "HBM-like memory" to smartphones, tablets and laptops to provide power for end-side AI. According to previous reports on this site, Samsung Electronics’ product is called LPWide I/O memory, and SK Hynix calls this technology VFO. The two companies have used roughly the same technical route, which is to combine fan-out packaging and vertical channels. Samsung Electronics’ LPWide I/O memory has a bit width of 512

Kingbang launches new DDR5 8600 memory, offering CAMM2, LPCAMM2 and regular models to choose from Kingbang launches new DDR5 8600 memory, offering CAMM2, LPCAMM2 and regular models to choose from Jun 08, 2024 pm 01:35 PM

According to news from this site on June 7, GEIL launched its latest DDR5 solution at the 2024 Taipei International Computer Show, and provided SO-DIMM, CUDIMM, CSODIMM, CAMM2 and LPCAMM2 versions to choose from. ▲Picture source: Wccftech As shown in the picture, the CAMM2/LPCAMM2 memory exhibited by Jinbang adopts a very compact design, can provide a maximum capacity of 128GB, and a speed of up to 8533MT/s. Some of these products can even be stable on the AMDAM5 platform Overclocked to 9000MT/s without any auxiliary cooling. According to reports, Jinbang’s 2024 Polaris RGBDDR5 series memory can provide up to 8400

Intel CPU size and core scheduling issues, CPU size and core optimization settings above 12 generations Intel CPU size and core scheduling issues, CPU size and core optimization settings above 12 generations Jun 19, 2024 am 01:42 AM

Inteli5-12600 and above CPUs, i5-13400 and above CPUs have P-Core performance cores (large cores) and E-Core energy efficiency cores (small cores). Due to the scheduling problem of "big and small cores", some games may drop frames. , lag, not as good as the old CPU before. In fact, the system thinks that to cope with the current scene, the younger one can handle it, and there is no need to dispatch the older one, so the older core has been resting and not working. The editor below will teach you how to solve this problem. Create a new text document on the desktop, copy the following content, save it as 1.reg, and then right-click to merge. WindowsRegistryEditorVersion5.00[HKEY_LOCAL_MACHINE\SY

Lexar God of War Wings ARES RGB DDR5 8000 Memory Picture Gallery: Colorful White Wings supports RGB Lexar God of War Wings ARES RGB DDR5 8000 Memory Picture Gallery: Colorful White Wings supports RGB Jun 25, 2024 pm 01:51 PM

When the prices of ultra-high-frequency flagship memories such as 7600MT/s and 8000MT/s are generally high, Lexar has taken action. They have launched a new memory series called Ares Wings ARES RGB DDR5, with 7600 C36 and 8000 C38 is available in two specifications. The 16GB*2 sets are priced at 1,299 yuan and 1,499 yuan respectively, which is very cost-effective. This site has obtained the 8000 C38 version of Wings of War, and will bring you its unboxing pictures. The packaging of Lexar Wings ARES RGB DDR5 memory is well designed, using eye-catching black and red color schemes with colorful printing. There is an exclusive &quo in the upper left corner of the packaging.

See all articles