Performance testing upload/download using AntTP

With the latest version rolling out further, I thought I’d give it another test:

$ cat ~/dev/anttp/test/performance/src/localhost-autonomi-http.js; k6 run -u 10 -i 1000 ~/dev/anttp/test/performance/src/localhost-autonomi-http.js
import http from 'k6/http';

export default function () {
  http.get('http://localhost:8080/cec7a9eb2c644b9a5de58bbcdf2e893db9f0b2acd7fc563fc849e19d1f6bd872/1_QdxdljdwBwR2QbAVr8scuw.png', { timeout: '600s' });
  http.get('http://localhost:8080/cec7a9eb2c644b9a5de58bbcdf2e893db9f0b2acd7fc563fc849e19d1f6bd872/1_dH5Ce6neTHIfEkAbmsr1BQ.jpeg', { timeout: '600s' });
  http.get('http://localhost:8080/cec7a9eb2c644b9a5de58bbcdf2e893db9f0b2acd7fc563fc849e19d1f6bd872/1_pt48p45dQmR5PBW8np1l8Q.png', { timeout: '600s' });
  http.get('http://localhost:8080/cec7a9eb2c644b9a5de58bbcdf2e893db9f0b2acd7fc563fc849e19d1f6bd872/1_sWZ4OWGeQjWs6urcPwR6Yw.png', { timeout: '600s' });
  http.get('http://localhost:8080/cec7a9eb2c644b9a5de58bbcdf2e893db9f0b2acd7fc563fc849e19d1f6bd872/1_ZT6qplX5Yt8PMCUqxq1lFQ.png', { timeout: '600s' });
  http.get('http://localhost:8080/cec7a9eb2c644b9a5de58bbcdf2e893db9f0b2acd7fc563fc849e19d1f6bd872/1_SxkGLnSNsMtu0SDrsWW8Wg.jpeg', { timeout: '600s' });
  http.get('http://localhost:8080/cec7a9eb2c644b9a5de58bbcdf2e893db9f0b2acd7fc563fc849e19d1f6bd872/1_bogEVpJvgx_gMHQoHMoSLg.jpeg', { timeout: '600s' });
  http.get('http://localhost:8080/cec7a9eb2c644b9a5de58bbcdf2e893db9f0b2acd7fc563fc849e19d1f6bd872/1_LFEyRQMHmxRnZtJwMozW5w.jpeg', { timeout: '600s' });
}

         /\      Grafana   /‾‾/  
    /\  /  \     |\  __   /  /   
   /  \/    \    | |/ /  /   ‾‾\ 
  /          \   |   (  |  (‾)  |
 / __________ \  |_|\_\  \_____/ 

     execution: local
        script: /home/paul/dev/anttp/test/performance/src/localhost-autonomi-http.js
        output: -

     scenarios: (100.00%) 1 scenario, 10 max VUs, 10m30s max duration (incl. graceful stop):
              * default: 1000 iterations shared among 10 VUs (maxDuration: 10m0s, gracefulStop: 30s)


     data_received..................: 2.8 GB 4.7 MB/s
     data_sent......................: 1.1 MB 1.9 kB/s
     dropped_iterations.............: 190    0.3162/s
     http_req_blocked...............: avg=6.56µs   min=1.4µs   med=4.08µs   max=752.72µs p(90)=11.05µs  p(95)=14.19µs 
     http_req_connecting............: avg=252ns    min=0s      med=0s       max=223.98µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=927.15ms min=356.1ms med=860.09ms max=2.85s    p(90)=1.41s    p(95)=1.68s   
       { expected_response:true }...: avg=927.15ms min=356.1ms med=860.09ms max=2.85s    p(90)=1.41s    p(95)=1.68s   
     http_req_failed................: 0.00%  0 out of 6480
     http_req_receiving.............: avg=621.6ms  min=223.8ms med=564.47ms max=2.5s     p(90)=1.03s    p(95)=1.25s   
     http_req_sending...............: avg=29.02µs  min=4.98µs  med=14.22µs  max=7.31ms   p(90)=39.44µs  p(95)=60.47µs 
     http_req_tls_handshaking.......: avg=0s       min=0s      med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=305.52ms min=38.6ms  med=289.13ms max=1.11s    p(90)=507.56ms p(95)=610.88ms
     http_reqs......................: 6480   10.784096/s
     iteration_duration.............: avg=7.41s    min=5.83s   med=7.14s    max=13.38s   p(90)=8.33s    p(95)=10.05s  
     iterations.....................: 810    1.348012/s
     vus............................: 10     min=10        max=10
     vus_max........................: 10     min=10        max=10


running (10m00.9s), 00/10 VUs, 810 complete and 0 interrupted iterations
default ✗ [=============================>--------] 10 VUs  10m00.9s/10m0s  0810/1000 shared iters

I think that is the fastest run yet and we’re starting to be comparable with the beta network!

While 4.7 MB/s (38 Mbit/s) is pretty impressive for these average (100-300kb) files, 925ms average download time is very nice indeed!

IIRC, we got to around 850ms in beta, with a few thousand nodes. We’re now getting the same sort of results with millions of nodes!

Improvements to AntTP may have played a role in this too, but the major changes are to the Autonomi Network. Well done team!

What does this mean? Under 1s starts to open the door to all sorts of content rich websites. Combined with some nice caching and some optimisations in archive format (e.g. tarchive and it should be a very smooth browsing experience!

17 Likes