简体   繁体   中英

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:

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:

Windows Azure virtual machine A1 1,75GB 1 CPU core: 41 req/s 814 ms mean response time

Windows Azure virtual machine A2 3,50GB 2 CPU cores: 41 req/s 971 ms mean response time

Windows local machine 8GB Intel B950 2.10GHz: 181 req/s 175 ms mean response time

Windows local machine 4GB Intel i7-3537U 2.00GHz: 140 req/s 280 ms mean response time

So this raises some obvious questions. Why is A1 and A2 having simular results? Why is my local 4GB machine performing so much better than A2?

I have tried to change wrapper.java.initmemory and wrapper.java.maxmemory to 1024, 2048 and 3072 without any major performance changes. I have also tried to tweak the memory mapped buffer sizes without any success. Is my problem that I am running on 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.

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

Execute 1000 requests with 100 nodes each and 4 concurrent users.

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

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:

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. It only manage 24 req/s with a mean of 1655 ms. Now I feel even more confused than before :) Especially seeing Michaels benchmark numbers above, is there something wrong with the test code? 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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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