home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1110278577

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/datasette/issues/1723#issuecomment-1110278577 https://api.github.com/repos/simonw/datasette/issues/1723 1110278577 IC_kwDOBm6k_c5CLYGx 9599 2022-04-26T21:44:04Z 2022-04-26T21:44:04Z OWNER

And some simple benchmarks with ab - using the ?_parallel=1 hack to try it with and without a parallel asyncio.gather():

~ % ab -n 100 'http://127.0.0.1:8001/global-power-plants/global-power-plants?_facet=primary_fuel&_facet=other_fuel1&_facet=other_fuel3&_facet=other_fuel2'                    
This is ApacheBench, Version 2.3 <$Revision: 1879490 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient).....done


Server Software:        uvicorn
Server Hostname:        127.0.0.1
Server Port:            8001

Document Path:          /global-power-plants/global-power-plants?_facet=primary_fuel&_facet=other_fuel1&_facet=other_fuel3&_facet=other_fuel2
Document Length:        314187 bytes

Concurrency Level:      1
Time taken for tests:   68.279 seconds
Complete requests:      100
Failed requests:        13
   (Connect: 0, Receive: 0, Length: 13, Exceptions: 0)
Total transferred:      31454937 bytes
HTML transferred:       31418437 bytes
Requests per second:    1.46 [#/sec] (mean)
Time per request:       682.787 [ms] (mean)
Time per request:       682.787 [ms] (mean, across all concurrent requests)
Transfer rate:          449.89 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:   621  683  68.0    658     993
Waiting:      620  682  68.0    657     992
Total:        621  683  68.0    658     993

Percentage of the requests served within a certain time (ms)
  50%    658
  66%    678
  75%    687
  80%    711
  90%    763
  95%    879
  98%    926
  99%    993
 100%    993 (longest request)


----

In parallel:

~ % ab -n 100 'http://127.0.0.1:8001/global-power-plants/global-power-plants?_facet=primary_fuel&_facet=other_fuel1&_facet=other_fuel3&_facet=other_fuel2&_parallel=1'
This is ApacheBench, Version 2.3 <$Revision: 1879490 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient).....done


Server Software:        uvicorn
Server Hostname:        127.0.0.1
Server Port:            8001

Document Path:          /global-power-plants/global-power-plants?_facet=primary_fuel&_facet=other_fuel1&_facet=other_fuel3&_facet=other_fuel2&_parallel=1
Document Length:        315703 bytes

Concurrency Level:      1
Time taken for tests:   34.763 seconds
Complete requests:      100
Failed requests:        11
   (Connect: 0, Receive: 0, Length: 11, Exceptions: 0)
Total transferred:      31607988 bytes
HTML transferred:       31570288 bytes
Requests per second:    2.88 [#/sec] (mean)
Time per request:       347.632 [ms] (mean)
Time per request:       347.632 [ms] (mean, across all concurrent requests)
Transfer rate:          887.93 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:   311  347  28.0    338     450
Waiting:      311  347  28.0    338     450
Total:        312  348  28.0    338     451

Percentage of the requests served within a certain time (ms)
  50%    338
  66%    348
  75%    361
  80%    367
  90%    396
  95%    408
  98%    436
  99%    451
 100%    451 (longest request)

----

With concurrency 10, not parallel:

~ % ab -c 10 -n 100 'http://127.0.0.1:8001/global-power-plants/global-power-plants?_facet=primary_fuel&_facet=other_fuel1&_facet=other_fuel3&_facet=other_fuel2&_parallel=' 
This is ApacheBench, Version 2.3 <$Revision: 1879490 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient).....done


Server Software:        uvicorn
Server Hostname:        127.0.0.1
Server Port:            8001

Document Path:          /global-power-plants/global-power-plants?_facet=primary_fuel&_facet=other_fuel1&_facet=other_fuel3&_facet=other_fuel2&_parallel=
Document Length:        314346 bytes

Concurrency Level:      10
Time taken for tests:   38.408 seconds
Complete requests:      100
Failed requests:        93
   (Connect: 0, Receive: 0, Length: 93, Exceptions: 0)
Total transferred:      31471333 bytes
HTML transferred:       31433733 bytes
Requests per second:    2.60 [#/sec] (mean)
Time per request:       3840.829 [ms] (mean)
Time per request:       384.083 [ms] (mean, across all concurrent requests)
Transfer rate:          800.18 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       1
Processing:   685 3719 354.0   3774    4096
Waiting:      684 3707 353.7   3750    4095
Total:        685 3719 354.0   3774    4096

Percentage of the requests served within a certain time (ms)
  50%   3774
  66%   3832
  75%   3855
  80%   3878
  90%   3944
  95%   4006
  98%   4057
  99%   4096
 100%   4096 (longest request)


----

Concurrency 10 parallel:

~ % ab -c 10 -n 100 'http://127.0.0.1:8001/global-power-plants/global-power-plants?_facet=primary_fuel&_facet=other_fuel1&_facet=other_fuel3&_facet=other_fuel2&_parallel=1'
This is ApacheBench, Version 2.3 <$Revision: 1879490 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient).....done


Server Software:        uvicorn
Server Hostname:        127.0.0.1
Server Port:            8001

Document Path:          /global-power-plants/global-power-plants?_facet=primary_fuel&_facet=other_fuel1&_facet=other_fuel3&_facet=other_fuel2&_parallel=1
Document Length:        315703 bytes

Concurrency Level:      10
Time taken for tests:   36.762 seconds
Complete requests:      100
Failed requests:        89
   (Connect: 0, Receive: 0, Length: 89, Exceptions: 0)
Total transferred:      31606516 bytes
HTML transferred:       31568816 bytes
Requests per second:    2.72 [#/sec] (mean)
Time per request:       3676.182 [ms] (mean)
Time per request:       367.618 [ms] (mean, across all concurrent requests)
Transfer rate:          839.61 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       0
Processing:   381 3602 419.6   3609    4458
Waiting:      381 3586 418.7   3607    4457
Total:        381 3603 419.6   3609    4458

Percentage of the requests served within a certain time (ms)
  50%   3609
  66%   3741
  75%   3791
  80%   3821
  90%   3972
  95%   4074
  98%   4386
  99%   4458
 100%   4458 (longest request)


Trying -c 3 instead. Non parallel:

~ % ab -c 3 -n 100 'http://127.0.0.1:8001/global-power-plants/global-power-plants?_facet=primary_fuel&_facet=other_fuel1&_facet=other_fuel3&_facet=other_fuel2&_parallel='
This is ApacheBench, Version 2.3 <$Revision: 1879490 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient).....done


Server Software:        uvicorn
Server Hostname:        127.0.0.1
Server Port:            8001

Document Path:          /global-power-plants/global-power-plants?_facet=primary_fuel&_facet=other_fuel1&_facet=other_fuel3&_facet=other_fuel2&_parallel=
Document Length:        314346 bytes

Concurrency Level:      3
Time taken for tests:   39.365 seconds
Complete requests:      100
Failed requests:        83
   (Connect: 0, Receive: 0, Length: 83, Exceptions: 0)
Total transferred:      31470808 bytes
HTML transferred:       31433208 bytes
Requests per second:    2.54 [#/sec] (mean)
Time per request:       1180.955 [ms] (mean)
Time per request:       393.652 [ms] (mean, across all concurrent requests)
Transfer rate:          780.72 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:   731 1153 126.2   1189    1359
Waiting:      730 1151 125.9   1188    1358
Total:        731 1153 126.2   1189    1359

Percentage of the requests served within a certain time (ms)
  50%   1189
  66%   1221
  75%   1234
  80%   1247
  90%   1296
  95%   1309
  98%   1343
  99%   1359
 100%   1359 (longest request)

----

Parallel:

~ % ab -c 3 -n 100 'http://127.0.0.1:8001/global-power-plants/global-power-plants?_facet=primary_fuel&_facet=other_fuel1&_facet=other_fuel3&_facet=other_fuel2&_parallel=1'
This is ApacheBench, Version 2.3 <$Revision: 1879490 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient).....done


Server Software:        uvicorn
Server Hostname:        127.0.0.1
Server Port:            8001

Document Path:          /global-power-plants/global-power-plants?_facet=primary_fuel&_facet=other_fuel1&_facet=other_fuel3&_facet=other_fuel2&_parallel=1
Document Length:        315703 bytes

Concurrency Level:      3
Time taken for tests:   34.530 seconds
Complete requests:      100
Failed requests:        18
   (Connect: 0, Receive: 0, Length: 18, Exceptions: 0)
Total transferred:      31606179 bytes
HTML transferred:       31568479 bytes
Requests per second:    2.90 [#/sec] (mean)
Time per request:       1035.902 [ms] (mean)
Time per request:       345.301 [ms] (mean, across all concurrent requests)
Transfer rate:          893.87 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:   412 1020 104.4   1018    1280
Waiting:      411 1018 104.1   1014    1275
Total:        412 1021 104.4   1018    1280

Percentage of the requests served within a certain time (ms)
  50%   1018
  66%   1041
  75%   1061
  80%   1079
  90%   1136
  95%   1176
  98%   1251
  99%   1280
 100%   1280 (longest request)
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
1216508080  
Powered by Datasette · Queries took 1.076ms · About: github-to-sqlite