简体   繁体   English

Windows Azure上的Neo4j性能

[英]Neo4j performance on Windows Azure

Firstly apologies for my nonexistent knowledge in this area, my passion is to develope new useful applications not configuring cloud servers :) Have spent the day trying to figure out the optimal configuration for running a Neo4j server on Windows without any success at all :( I am using the approach from this excellent blog post to write simple nodes to an empty database: 首先,对我在该领域不了解的知识表示歉意,我的热情是开发新的有用的应用程序而不配置云服务器:)花了整整一天的时间来找出在Windows上运行Neo4j服务器的最佳配置,但没有成功:(我正在使用这篇出色的博客文章中的方法将简单节点写入空数据库:

http://maxdemarzi.com/2013/02/14/neo4j-and-gatling-sitting-in-a-tree-performance-test-ing/ http://maxdemarzi.com/2013/02/14/neo4j-and-gatling-sitting-in-a-tree-performance-test-ing/

Simulating 40 users posting 250 new nodes each gives me below (crappy?) results on diffrent machines: 模拟40个用户,每个用户发布250个新节点,则在不同的计算机上获得以下结果(糟糕吗?):

Windows Azure virtual machine A1 1,75GB 1 CPU core: 41 req/s 814 ms mean response time Windows Azure虚拟机A1 1,75GB 1个CPU内核:41 req / s 814 ms平均响应时间

Windows Azure virtual machine A2 3,50GB 2 CPU cores: 41 req/s 971 ms mean response time Windows Azure虚拟机A2 3,50GB 2个CPU内核:41 req / s 971 ms平均响应时间

Windows local machine 8GB Intel B950 2.10GHz: 181 req/s 175 ms mean response time Windows本地计算机8GB Intel B950 2.10GHz:181 req / s 175 ms平均响应时间

Windows local machine 4GB Intel i7-3537U 2.00GHz: 140 req/s 280 ms mean response time Windows本地计算机4GB Intel i7-3537U 2.00GHz:140 req / s 280 ms平均响应时间

So this raises some obvious questions. 因此,这引起了一些明显的问题。 Why is A1 and A2 having simular results? 为什么A1和A2具有相似的结果? Why is my local 4GB machine performing so much better than A2? 为什么我的本地4GB机器的性能要比A2好得多?

I have tried to change wrapper.java.initmemory and wrapper.java.maxmemory to 1024, 2048 and 3072 without any major performance changes. 我尝试将wrapper.java.initmemory和wrapper.java.maxmemory更改为1024、2048和3072,而没有任何重大的性能更改。 I have also tried to tweak the memory mapped buffer sizes without any success. 我也试图调整内存映射的缓冲区大小,但没有成功。 Is my problem that I am running on Windows? 我是在Windows上运行吗? Shouldn't I be able to get better results with those machines? 使用这些机器我是否应该可以获得更好的结果? Really don't know where to start here, any suggestions would be extremely appreciated! 真的不知道从哪里开始,任何建议将不胜感激!

Regarding your questions on what you can expect: 关于您可以期待的问题:

For just creating nodes (despite each create being a single transaction), if you use cypher with parameter you should get easily to 1k to 2k requests/s remotely. 对于仅创建节点(尽管每个创建都是单个事务),如果将cypher与参数一起使用,则应该可以轻松地远程处理1k至2k请求/秒。

If you batch it you should easily get more, here is a test I did lately. 如果批量处理,您应该可以轻松获得更多,这是我最近进行的一项测试。

JSON Data Generator: https://dl.dropboxusercontent.com/u/14493611/cypher.rb JSON数据生成器: https : //dl.dropboxusercontent.com/u/14493611/cypher.rb

Execute 1000 requests with 100 nodes each and 4 concurrent users. 执行每个1000个节点和4个并发用户的1000个请求。

ab -H "X-Stream: true" -k -n 1000 -c 4 -p cypher_100.json \
   -T 'application/json' -H "Accept: application/json" \
   http://127.0.0.1:7474/db/data/transaction/commit

18s for 100k nodes 100k节点18s

Following Michaels suggestion I set up neo4j-enterprise-2.1.5 on an Azure A2 Linux machine and tested the same simple creation of 10000 nodes: 按照Michaels的建议,我在Azure A2 Linux计算机上设置了neo4j-enterprise-2.1.5,并测试了10000个节点的简单创建:

class CreateSimpleNodes extends Simulation {

val httpConf = httpConfig
    .baseURL("http://xxxxx.cloudapp.net:7474")
    .acceptHeader("application/json")

  val createNode = """{"query": "create me"}"""

  val scn = scenario("Create Nodes")
    .repeat(250) {
    exec(
      http("create node")
        .post("/db/data/cypher")
        .body(createNode)
        .asJSON
        .check(status.is(200)))
      .pause(0 milliseconds, 1 milliseconds)
  }

  setUp(
    scn.users(40).protocolConfig(httpConf)
  )
}

And it actually performs worse than the Windows A2. 它实际上比Windows A2的性能差。 It only manage 24 req/s with a mean of 1655 ms. 它只能管理24 req / s,平均1655 ms。 Now I feel even more confused than before :) Especially seeing Michaels benchmark numbers above, is there something wrong with the test code? 现在,我比以前更加困惑:)特别是看到上面的Michaels基准数字时,测试代码是否有问题? The obvious questions still remains a mystery, why is A1 and A2 having simular results and why is my local 4GB machine performing much better than A2? 显而易见的问题仍然是一个谜,为什么A1和A2的结果相似,为什么我的本地4GB机器的性能要比A2好得多?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM