Hi All,

I have been running curl http2 on top of my MPTCP setup with two ~3Mbps links

            ----- 3Mbps -----
client(curl)                  server(nginx)
            ----- 3Mbps -----

The client requests for files from the server that runs nginx for http1.1 and http2 using the commands in the attachment.

I observe that the download rate for http1.1 is ~6Mbps, but for http2 is only ~3Mbps (verified through wireshark traces)

I am unable to figure out why http2 over curl performs so poorly.

I would be grateful if anyone could share their insights or point me in the right direction.

I have attached (curl_http2_mptcp.txt) the system specifications, commands and installation steps that i used. Please let me know if you need more information.

Thanks,
Raj

P.S. without MPTCP (client(curl) ----- 3Mbps ----- server(nginx)), i see correct behavior i.e. both http1.1 and http2 have similar download rates (~ 3Mbps)
#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

#    server {
#        listen       80;
#        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

#        location / {
#            root   html;
#            index  index.html index.htm;
#        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
#        error_page   500 502 503 504  /50x.html;
#        location = /50x.html {
#            root   html;
#        }

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ \.php$ {
        #    root           html;
        #    fastcgi_pass   127.0.0.1:9000;
        #    fastcgi_index  index.php;
        #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        #    include        fastcgi_params;
        #}

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
#    }

    # HTTP2S server
    #
    server {
        listen       443 ssl http2;
        server_name  localhost;

        ssl_certificate      /users/rdeshm0/cert.pem;
        ssl_certificate_key  /users/rdeshm0/cert.key;

    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;

    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;

        location / {
            root   /users/rdeshm0;
#            index  index.html index.htm;
        }
    }    

    server {
        listen       9000 ssl;
        server_name  localhost;

        ssl_certificate      /users/rdeshm0/cert.pem;
        ssl_certificate_key  /users/rdeshm0/cert.key;

    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;

    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;

        location / {
            root   /users/rdeshm0;
#            index  index.html index.htm;
        }
    }    


    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}


    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;

    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;

    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

}
client commands:
#### I am using self generated certificates check step 4 in installation 
instructions
curl -k 
https://10.10.3.2/www-itec.uni-klu.ac.at/ftp/datasets/DASHDataset2014/BigBuckBunny/2sec/bunny_4219897bps/BigBuckBunny_2s1.m4s
 --http2 --key-type PEM --key cert.key --cert cert.crt --tlsv1.2 --resolve 
10.10.3.2:443 >d
curl -k 
https://10.10.3.2/www-itec.uni-klu.ac.at/ftp/datasets/DASHDataset2014/BigBuckBunny/2sec/bunny_4219897bps/BigBuckBunny_2s1.m4s
 --http1.1 --key-type PEM --key cert.key --cert cert.crt --tlsv1.2 --resolve 
10.10.3.2:9000 >d

system: Linux version 3.18.20-90-mptcp (root@panepistimio) (gcc version 4.8.2 
(Ubuntu 4.8.2-19ubuntu1) ) #0r04 SMP Tue Oct 20 14:32:03 CEST 2015
        Description: Ubuntu 14.04.5 LTS, Release: 14.04, Codename: trusty

curl_version: wget http://curl.haxx.se/download/curl-7.46.0.tar.bz2

mptcp_version: MPTCP: Stable release v0.90.0 (compatable with ubuntu trusty)

nginx server: nginx-1.15.7 (released in Nov 2018)


##############Installation Instructions ##############

#1 ##############

MPTCP installation instructions:
http://multipath-tcp.org/pmwiki.php/Users/AptRepository
wget -q -O - https://multipath-tcp.org/mptcp.gpg.key | sudo apt-key add -
sudo nano /etc/apt/sources.list.d/mptcp.list
deb https://multipath-tcp.org/repos/apt/debian trusty main
sudo apt-get update;sudo apt-get install -y linux-mptcp;sudo reboot
sudo apt-get update -y;sudo apt-get dist-upgrade -y
ip link set dev eth0 multipath off # to exclude unintended interfaces from mptcp
sudo nano /sys/module/mptcp_fullmesh/parameters/num_subflows #2

#2 ##############

Install libcurl and curl:
# https://serversforhackers.com/c/curl-with-http2-support
sudo apt-get install -y g++ make binutils autoconf automake autotools-dev 
libtool pkg-config \
  zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev 
libjansson-dev \
  libjemalloc-dev cython python3-dev python-setuptools

# Build nghttp2 from source
git clone https://github.com/tatsuhiro-t/nghttp2.git
cd nghttp2
autoreconf -i
automake
autoconf
./configure
make
sudo make install

cd ~
sudo apt-get build-dep curl -y
wget http://curl.haxx.se/download/curl-7.46.0.tar.bz2
tar -xvjf curl-7.46.0.tar.bz2
cd curl-7.46.0
./configure --with-nghttp2=/usr/local --with-ssl
make
sudo make install
sudo ldconfig

#3 ##############

Install nginx:
cd
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.42.tar.gz
tar -zxf pcre-8.42.tar.gz
cd pcre-8.42
./configure
make
sudo make install
cd ..
wget http://zlib.net/zlib-1.2.11.tar.gz
tar -zxf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure
make
sudo make install
cd ..
wget http://www.openssl.org/source/openssl-1.0.2q.tar.gz
tar -zxf openssl-1.0.2q.tar.gz
cd openssl-1.0.2q
sudo ./Configure linux-x86_64 --prefix=/usr
make
sudo make install
cd ..
wget https://nginx.org/download/nginx-1.15.7.tar.gz
tar zxf nginx-1.15.7.tar.gz
cd nginx-1.15.7

sudo ./configure --sbin-path=/usr/local/nginx/nginx 
--conf-path=/usr/local/nginx/nginx.conf --pid-path=/usr/local/nginx/nginx.pid 
--with-pcre=../pcre-8.42 --with-zlib=../zlib-1.2.11 
--with-openssl=../openssl-1.0.2q --with-http_ssl_module --with-stream 
--with-http_v2_module --with-mail=dynamic
# replace nginx.conf file with the one in the attachments
sudo ./nginx

#4 Generate certificate:(have the same certificates on server and client)###

openssl genrsa 2048 > cert.key
openssl req -new -x509 -nodes -sha1 -days 365 -key cert.key -out cert.crt
Common Name (e.g. server FQDN or YOUR name) []:<server ip(10.10.2.1)>
openssl x509 -in cert.crt -out cert.pem -outform PEM
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to