Showing posts with label performance. Show all posts
Showing posts with label performance. Show all posts

Friday, 9 March 2012

factbook progress

Switched back to passport.js from everyauth. I find Everyauth difficult to use and it seems to have jade dependency. A shame because it's register step and redirect control seems to be what I want.

Trying..
http://fortawesome.github.com/Font-Awesome/#

Still having performance problems. The borders display takes 35s for 613 borders.

Thursday, 16 February 2012

XQuery parser in Javascript performance

"even more scary is how lightning fast the exact same program is in javascript... "
@wcandillon

What are the numbers?

Gunther Rademacher's REX parser generator can target several languages including Javascript.

The Javascript output is designed for jrunscript. To see what it expects use the option:
Main program=simple
jrunscript did not work for me, nor did Rhino, probably  due to my lack of familiarity  with these tools.
I wanted to run using Node.js and this required a few changes to the javascript
  1. changing  the writeOutput function to capture the result 
  2. setting the module exports module.exports = xquery30
The node main module is:

var Xq=require("./xq3.js");
var out=[];
var parser=new Xq("2+3",out);
parser.parse_XQuery();
console.log(out.join("")); 

The numbers:

time node app.js
real 0m0.278s
user 0m0.212s
sys 0m0.020s
No doubt the c++ is faster. Perhaps the winner is EBNF.

Github: xqparserperf 

Monday, 13 February 2012

XQuery parser performance

This post was updated on 15th Feb with the BaseX 7.1.1 results

A comparison of XQuery engine performance running the XQuery parser from xquerydoc project. The test parses the XQuery program string "2+3":

import module namespace p="XQueryV30" at "XQueryV30.xq";
p:parse-XQuery("2+3")

Engines

  • Zorba XQuery Engine, Version: 2.1.0
  • BaseX 7.1.1 Beta  [Standalone]
  • Saxon-HE 9.4.0.2J
  • MXQuery 0.6.0

java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)


Running on Ubuntu 11.04 on a Thinkpad T42.

Zorba


time zorba -f -q test_xqparser.xq 
real 0m24.562s 
user 0m21.489s 
sys  0m0.240s

BaseX

Results for version 7.1.1 (BaseX711-20120215.234615)

time basex test_xqparser.xq
real 0m1.601s
user 0m1.260s
sys 0m0.088s
Results for version 7.1.0
time basex test_xqparser.xq
real 96m29.589s
user 54m35.961s
sys 0m19.533s

Saxon


time saxon-xq test_xqparser.xq 
real 0m2.673s
user 0m2.372s
sys  0m0.140s

MXQuery


java -Xms1024m -Xmx1024m  -jar mxquery.jar -f test_xqparser.xq
MXQuery 0.6.0
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

All scripts are run from the xqparserperf/src directory.

Github: xqparserperf 

(import-existing-source-code-to-github)

Sunday, 27 November 2011

more performance

Back on node 0.4, working on id resolution, performance dreadful
Document Path:          /fb/country
Document Length:        158878 bytes

Concurrency Level:      5
Time taken for tests:   913.225 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      15911748 bytes
HTML transferred:       15887800 bytes
Requests per second:    0.11 [#/sec] (mean)
Time per request:       45661.240 [ms] (mean)
Time per request:       9132.248 [ms] (mean, across all concurrent requests)
Transfer rate:          17.02 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.5      0       4
Processing:  7438 44742 6506.7  45143   55947
Waiting:     7397 44712 6503.3  45133   55937
Total:       7439 44743 6506.4  45143   55947

Percentage of the requests served within a certain time (ms)
  50%  45143
  66%  47397
  75%  47790
  80%  48077
  90%  49007
  95%  51383
  98%  55787
  99%  55947
 100%  55947 (longest request)

Removing idLink
Document Path:          /fb/country
Document Length:        158692 bytes

Concurrency Level:      5
Time taken for tests:   40.286 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      15893156 bytes
HTML transferred:       15869200 bytes
Requests per second:    2.48 [#/sec] (mean)
Time per request:       2014.309 [ms] (mean)
Time per request:       402.862 [ms] (mean, across all concurrent requests)
Transfer rate:          385.26 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.4      0       3
Processing:   344 1977 292.5   1955    2817
Waiting:      288 1947 287.4   1924    2590
Total:        345 1977 292.3   1955    2817

Percentage of the requests served within a certain time (ms)
  50%   1955
  66%   2001
  75%   2042
  80%   2068
  90%   2338
  95%   2558
  98%   2607
  99%   2817
 100%   2817 (longest request)

Sunday, 13 November 2011

more performance

Getting better not sure why, working on send pipeline.

Document Path:          /country
Document Length:        93520 bytes

Concurrency Level:      5
Time taken for tests:   103.874 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      9375970 bytes
HTML transferred:       9352000 bytes
Requests per second:    0.96 [#/sec] (mean)
Time per request:       5193.684 [ms] (mean)
Time per request:       1038.737 [ms] (mean, across all concurrent requests)
Transfer rate:          88.15 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.2      0       9
Processing:  1000 5090 569.7   5191    5304
Waiting:      997 5088 570.3   5189    5302
Total:       1001 5090 568.9   5191    5304

Percentage of the requests served within a certain time (ms)
  50%   5191
 

Monday, 7 November 2011

Node BaseX performance tesing


50% 5692
Server Software:       
Server Hostname:        127.0.0.1
Server Port:            9000

Document Path:          /country
Document Length:        203972 bytes

Concurrency Level:      5
Time taken for tests:   115.494 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      20421162 bytes
HTML transferred:       20397200 bytes
Requests per second:    0.87 [#/sec] (mean)
Time per request:       5774.684 [ms] (mean)
Time per request:       1154.937 [ms] (mean, across all concurrent requests)
Transfer rate:          172.67 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.6      0       5
Processing:  1708 5662 575.7   5692    6700
Waiting:     1173 5619 619.9   5670    6689
Total:       1710 5662 575.3   5692    6700

Percentage of the requests served within a certain time (ms)
  50%   5692
  66%   5738
  75%   5773
  80%   5804
  90%   5936
  95%   6444
  98%   6645
  99%   6700
 100%   6700 (longest request)

Monday, 3 October 2011

ab testing the node base client

Installed Apache ab for load testing
Using these instructions
Running the basex-node (0.2) Httpserver example
Local thinkpad t42:Result with 100 simultaneous users a constant 4.2 secs 

andy@ThinkPad-T42:~$ ab -n 300 -c 100 http://localhost:9000/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Finished 300 requests


Server Software:        
Server Hostname:        localhost
Server Port:            9000

Document Path:          /
Document Length:        372 bytes

Concurrency Level:      100
Time taken for tests:   12.555 seconds
Complete requests:      300
Failed requests:        0
Write errors:           0
Total transferred:      130800 bytes
HTML transferred:       111600 bytes
Requests per second:    23.89 [#/sec] (mean)
Time per request:       4185.159 [ms] (mean)
Time per request:       41.852 [ms] (mean, across all concurrent requests)
Transfer rate:          10.17 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    6   8.9      0      25
Processing:    11 3490 1214.0   4172    4232
Waiting:        8 3490 1214.0   4172    4232
Total:         32 3497 1206.5   4172    4232

Percentage of the requests served within a certain time (ms)
  50%   4172
  66%   4196
  75%   4208
  80%   4212
  90%   4216
  95%   4220
  98%   4228
  99%   4232
 100%   4232 (longest request)
On the Readynas pro 2
andy@ThinkPad-T42:~$ ab -n 300 -c 100 http://velvet:9000/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking velvet (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Finished 300 requests


Server Software:        
Server Hostname:        velvet
Server Port:            9000

Document Path:          /
Document Length:        312 bytes

Concurrency Level:      100
Time taken for tests:   13.577 seconds
Complete requests:      300
Failed requests:        0
Write errors:           0
Total transferred:      112800 bytes
HTML transferred:       93600 bytes
Requests per second:    22.10 [#/sec] (mean)
Time per request:       4525.533 [ms] (mean)
Time per request:       45.255 [ms] (mean, across all concurrent requests)
Transfer rate:          8.11 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        1   16  19.3      4     139
Processing:    64 3795 1179.3   4316    4863
Waiting:       64 3795 1179.3   4316    4863
Total:         77 3811 1173.3   4319    4922

Percentage of the requests served within a certain time (ms)
  50%   4319
  66%   4334
  75%   4364
  80%   4422
  90%   4619
  95%   4779
  98%   4853
  99%   4879
 100%   4922 (longest request)
Using from express faye app
andy@ThinkPad-T42:~$ ab -n 300 -c 100 http://orlop.webhop.info/faye/basex/This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking orlop.webhop.info (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Finished 300 requests


Server Software:        
Server Hostname:        orlop.webhop.info
Server Port:            80

Document Path:          /faye/basex/
Document Length:        312 bytes

Concurrency Level:      100
Time taken for tests:   13.030 seconds
Complete requests:      300
Failed requests:        0
Write errors:           0
Total transferred:      176856 bytes
HTML transferred:       93600 bytes
Requests per second:    23.02 [#/sec] (mean)
Time per request:       4343.177 [ms] (mean)
Time per request:       43.432 [ms] (mean, across all concurrent requests)
Transfer rate:          13.26 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        1   37 299.6      2    3013
Processing:    68 3590 1217.3   4214    4523
Waiting:       68 3590 1217.3   4212    4522
Total:         90 3628 1264.3   4217    7312

Percentage of the requests served within a certain time (ms)
  50%   4217
  66%   4316
  75%   4320
  80%   4322
  90%   4336
  95%   4343
  98%   4345
  99%   7228
 100%   7312 (longest request)

Sunday, 30 January 2011

thinkpad performance

Is it worth buying memory and battery for old thinkpads
t40 Intel Pentium M 1.50GHz 393
t42 Intel Pentium M 1.73GHz 448

http://www.cpubenchmark.net/cpu_list.php

AMD Athlon II P320 Dual-Core 1270