[
https://issues.apache.org/jira/browse/COUCHDB-798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12936049#action_12936049
]
Jan Lehnardt commented on COUCHDB-798:
--------------------------------------
I made a bunch of more tests, this time from my MacBook (my work machine) to my
iMac (effectively idle):
The graphs show that native mochijson2.erl are equal, if not a little better
for small docs. Real differences can be seen when concurrent writers ge cranked
up and are used with large docs.
More importantly, it shows now worse behaviour in these tests.
Based on this, I'm in favour of enabling +native for mochijson2.erl.
You can find the graphs way below.
--
#!/bin/sh
OPTS="--name1 trunk --name2 native-mochi --url1 http://berlin:5984 --url2
http://berlin:5985 --duration 60"
NUKE1="curl -sX DELETE http://berlin:5984/testreadandwrite"
NUKE2="curl -sX DELETE http://berlin:5985/testreadandwrite"
$NUKE1; $NUKE2;
node tests/compare_write_and_read.js --wclients 10 --rclients 10 $OPTS --doc
small; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --wclients 10 --rclients 25 $OPTS --doc
small; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --wclients 10 --rclients 50 $OPTS --doc
small; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --wclients 10 --rclients 75 $OPTS --doc
small; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --wclients 10 --rclients 100 $OPTS --doc
small; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --wclients 10 --rclients 125 $OPTS --doc
small; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --wclients 10 --rclients 150 $OPTS --doc
small; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --wclients 10 --rclients 200 $OPTS --doc
small; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --wclients 10 --rclients 10 $OPTS --doc
large; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --wclients 10 --rclients 25 $OPTS --doc
large; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --wclients 10 --rclients 50 $OPTS --doc
large; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --wclients 10 --rclients 75 $OPTS --doc
large; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --wclients 10 --rclients 100 $OPTS --doc
large; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --wclients 10 --rclients 125 $OPTS --doc
large; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --wclients 10 --rclients 150 $OPTS --doc
large; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --wclients 10 --rclients 200 $OPTS --doc
large; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --rclients 10 --wclients 10 $OPTS --doc
small; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --rclients 10 --wclients 25 $OPTS --doc
small; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --rclients 10 --wclients 50 $OPTS --doc
small; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --rclients 10 --wclients 75 $OPTS --doc
small; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --rclients 10 --wclients 100 $OPTS --doc
small; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --rclients 10 --wclients 125 $OPTS --doc
small; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --rclients 10 --wclients 150 $OPTS --doc
small; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --rclients 10 --wclients 200 $OPTS --doc
small; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --rclients 10 --wclients 10 $OPTS --doc
large; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --rclients 10 --wclients 25 $OPTS --doc
large; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --rclients 10 --wclients 50 $OPTS --doc
large; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --rclients 10 --wclients 75 $OPTS --doc
large; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --rclients 10 --wclients 100 $OPTS --doc
large; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --rclients 10 --wclients 125 $OPTS --doc
large; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --rclients 10 --wclients 150 $OPTS --doc
large; $NUKE1; $NUKE2
node tests/compare_write_and_read.js --rclients 10 --wclients 200 $OPTS --doc
large; $NUKE1; $NUKE2
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe271102e7e5
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe271102eb4c
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe271102ef6d
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe271102f4f4
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe271102fbc7
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe2711030061
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe2711030f53
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe2711031ccc
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe2711032501
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe2711032db7
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe2711032fc3
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe2711033dd0
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe2711034930
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe27110351fd
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe2711035a50
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe2711036610
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe2711036be4
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe271103714b
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe2711038086
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe2711038efa
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe27110392cd
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe2711039c0c
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe2711039d7f
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe271103a925
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe271103b7c6
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe271103be82
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe271103c1f3
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe271103caa3
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe271103d75c
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe271103d89f
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe271103df01
# http://graphs.mikeal.couchone.com/#/graph/5c859b3e7d1b9bd0488cfe271103ee44
> Compile mochijson2 down to native code
> --------------------------------------
>
> Key: COUCHDB-798
> URL: https://issues.apache.org/jira/browse/COUCHDB-798
> Project: CouchDB
> Issue Type: Improvement
> Components: Database Core
> Reporter: Adam Kocoloski
> Fix For: 1.2
>
>
> Adding a -compile(native) flag to mochijson2.erl results in a marked
> performance improvement for large documents. I did the following test
> node compare_write.js -u http://127.0.0.1:5984 -v http://127.0.0.1:5985 -1
> trunk -2 mochijson2-native -d large -r 2 -t 90 -c 200
> and got the results at [1]. The graph shows that the average client response
> time dropped by about 35% with the native encoder. Qualitatively, I also
> noticed that the native encoder used substantially fewer CPU cycles. On my
> dual core Macbook, idle CPU went from ~10% on trunk to ~25% with the +native
> version while the test was running.
> Running the same test with small documents showed essentially no difference
> between the two comparatives, which is not surprising.
> A potential downside of +native is instability in the VM. I've encountered
> issues on AMD machines with R13B04 when using +native for all modules, and
> the core dump pointed to an issue in HiPE. On the other hand, I think that
> mochijson2 should work very well as native code, since it doesn't do any
> message passing or I/O. I'm +1 on simply adding the compile option to the
> codebase in trunk to see how it behaves.
> [1]:
> http://mikeal.couchone.com/graphs/_design/app/_show/compareWriteTest/e69057a29bd6e4ac4ae0115fac00ae50
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.