Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable apache_benchmark mTCP SSL load test capability #285

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

vincentmli
Copy link
Contributor

Existing ab lack of SSL load test support. Add the apache benchmark
configure script with --enable-ssl and --with-ssl option. Adopt
openssl crypto/bio/bss_sock.c as example to enable ab to create SSL
connection over mTCP socket.

Example:

$./ab -N 1 -c 2 -n 4 https://10.1.72.68/
Configuration updated by mtcp_setconf().
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/


Loading mtcp configuration from : config/mtcp.conf
Loading interface setting
EAL: Detected 16 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Auto-detected process type: PRIMARY
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Probing VFIO support...
EAL: PCI device 0000:0b:00.0 on NUMA socket -1
EAL: Invalid NUMA socket, default to 0
EAL: probe driver: 15ad:7b0 net_vmxnet3
Total number of attached devices: 1
Interface name: dpdk0
EAL: Auto-detected process type: PRIMARY
Configurations:
Number of CPU cores available: 1
Number of CPU cores to use: 1
Number of TX ring descriptor: 512
Number of RX ring descriptor: 0
Number of source ip to use: 0
Maximum number of concurrency per core: 16000
Maximum number of preallocated buffers per core: 16000
Receive buffer size: 8192
Send buffer size: 8192
TCP timeout seconds: 30
TCP timewait seconds: 0
NICs to print statistics: dpdk0

Interfaces:
name: dpdk0, ifindex: 0, hwaddr: 00:50:56:86:10:76, ipaddr: 10.1.72.28, netmask: 255.255.0.0
Number of NIC queues: 1

Loading routing configurations from : config/route.conf
Routes:
Destination: 10.1.0.0/16, Mask: 255.255.0.0, Masked: 10.1.0.0, Route: ifdx-0
Destination: 10.1.72.0/24, Mask: 255.255.255.0, Masked: 10.1.72.0, Route: ifdx-0
Destination: 10.2.72.0/24, Mask: 255.255.255.0, Masked: 10.2.72.0, Route: ifdx-0
Destination: 10.169.0.0/16, Mask: 255.255.0.0, Masked: 10.169.0.0, Route: ifdx-0

Loading ARP table from : config/arp.conf
ARP Table:
IP addr: 10.1.72.68, dst_hwaddr: 00:50:56:86:22:BA

Initializing port 0... Ethdev port_id=0 tx_queue_id=0, new added offloads 0x8011 must be within pre-queue offload capabilities 0x0 in rte_eth_tx_queue_setup()

done:
rte_eth_dev_flow_ctrl_get: Function not supported
[dpdk_load_module: 765] Failed to get flow control info!
rte_eth_dev_flow_ctrl_set: Function not supported
[dpdk_load_module: 772] Failed to set flow control info!: errno: -95

Checking link statusdone
Port 0 Link Up - speed 10000 Mbps - full-duplex
Benchmarking 10.1.72.68 (be patient)...
CPU0 connecting to port 443
CPU 0: initialization finished.
[mtcp_create_context:1359] CPU 0 is now the master thread.
[CPU 0] dpdk0 flows: 0, RX: 9(pps) (err: 0), 0.00(Gbps), TX: 0(pps), 0.00(Gbps)
[ ALL ] dpdk0 flows: 0, RX: 9(pps) (err: 0), 0.00(Gbps), TX: 0(pps), 0.00(Gbps)
rte_eth_stats_reset: Function not supported
..done

Server Software: BigIP
Server Hostname: 10.1.72.68
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128

Document Path: /
Document Length: 13 bytes

Number of Cores: 1
Concurrency Level: 2
Time taken for tests: 0.715 seconds
Complete requests: 4
Failed requests: 0
Write errors: 0
Total transferred: 344 bytes
HTML transferred: 52 bytes
Requests per second: 5.60 [#/sec] (mean)
Time per request: 357.421 [ms] (mean)
Time per request: 178.710 [ms] (mean, across all concurrent requests)
Transfer rate: 0.47 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 5 7 1.2 7 8
Processing: 1 1 0.3 1 2
Waiting: 1 1 0.3 1 2
Total: 6 8 1.3 9 9

Percentage of the requests served within a certain time (ms)
50% 9
66% 9
75% 9
80% 9
90% 9
95% 9
98% 9
99% 9
100% 9 (longest request)
[RunMainLoop: 876] MTCP thread 0 finished.
[mtcp_free_context:1405] MTCP thread 0 joined.
[mtcp_destroy:1685] All MTCP threads are joined.

Existing ab lack of SSL load test support. Add the apache benchmark
configure script with --enable-ssl and --with-ssl option. Adopt
openssl crypto/bio/bss_sock.c as example to enable ab to create SSL
connection over mTCP socket.

Example:

$./ab  -N 1 -c 2 -n 4 https://10.1.72.68/
Configuration updated by mtcp_setconf().
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/

---------------------------------------------------------------------------------
Loading mtcp configuration from : config/mtcp.conf
Loading interface setting
EAL: Detected 16 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Auto-detected process type: PRIMARY
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Probing VFIO support...
EAL: PCI device 0000:0b:00.0 on NUMA socket -1
EAL:   Invalid NUMA socket, default to 0
EAL:   probe driver: 15ad:7b0 net_vmxnet3
Total number of attached devices: 1
Interface name: dpdk0
EAL: Auto-detected process type: PRIMARY
Configurations:
Number of CPU cores available: 1
Number of CPU cores to use: 1
Number of TX ring descriptor: 512
Number of RX ring descriptor: 0
Number of source ip to use: 0
Maximum number of concurrency per core: 16000
Maximum number of preallocated buffers per core: 16000
Receive buffer size: 8192
Send buffer size: 8192
TCP timeout seconds: 30
TCP timewait seconds: 0
NICs to print statistics: dpdk0
---------------------------------------------------------------------------------
Interfaces:
name: dpdk0, ifindex: 0, hwaddr: 00:50:56:86:10:76, ipaddr: 10.1.72.28, netmask: 255.255.0.0
Number of NIC queues: 1
---------------------------------------------------------------------------------
Loading routing configurations from : config/route.conf
Routes:
Destination: 10.1.0.0/16, Mask: 255.255.0.0, Masked: 10.1.0.0, Route: ifdx-0
Destination: 10.1.72.0/24, Mask: 255.255.255.0, Masked: 10.1.72.0, Route: ifdx-0
Destination: 10.2.72.0/24, Mask: 255.255.255.0, Masked: 10.2.72.0, Route: ifdx-0
Destination: 10.169.0.0/16, Mask: 255.255.0.0, Masked: 10.169.0.0, Route: ifdx-0
---------------------------------------------------------------------------------
Loading ARP table from : config/arp.conf
ARP Table:
IP addr: 10.1.72.68, dst_hwaddr: 00:50:56:86:22:BA
---------------------------------------------------------------------------------
Initializing port 0... Ethdev port_id=0 tx_queue_id=0, new added offloads 0x8011 must be within pre-queue offload capabilities 0x0 in rte_eth_tx_queue_setup()

done:
rte_eth_dev_flow_ctrl_get: Function not supported
[dpdk_load_module: 765] Failed to get flow control info!
rte_eth_dev_flow_ctrl_set: Function not supported
[dpdk_load_module: 772] Failed to set flow control info!: errno: -95

Checking link statusdone
Port 0 Link Up - speed 10000 Mbps - full-duplex
Benchmarking 10.1.72.68 (be patient)...
CPU0 connecting to port 443
CPU 0: initialization finished.
[mtcp_create_context:1359] CPU 0 is now the master thread.
[CPU 0] dpdk0 flows:      0, RX:       9(pps) (err:     0),  0.00(Gbps), TX:       0(pps),  0.00(Gbps)
[ ALL ] dpdk0 flows:      0, RX:       9(pps) (err:     0),  0.00(Gbps), TX:       0(pps),  0.00(Gbps)
rte_eth_stats_reset: Function not supported
..done

Server Software:        BigIP
Server Hostname:        10.1.72.68
Server Port:            443
SSL/TLS Protocol:       TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128

Document Path:          /
Document Length:        13 bytes

Number of Cores:        1
Concurrency Level:      2
Time taken for tests:   0.715 seconds
Complete requests:      4
Failed requests:        0
Write errors:           0
Total transferred:      344 bytes
HTML transferred:       52 bytes
Requests per second:    5.60 [#/sec] (mean)
Time per request:       357.421 [ms] (mean)
Time per request:       178.710 [ms] (mean, across all concurrent requests)
Transfer rate:          0.47 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        5    7   1.2      7       8
Processing:     1    1   0.3      1       2
Waiting:        1    1   0.3      1       2
Total:          6    8   1.3      9       9

Percentage of the requests served within a certain time (ms)
  50%      9
  66%      9
  75%      9
  80%      9
  90%      9
  95%      9
  98%      9
  99%      9
 100%      9 (longest request)
[RunMainLoop: 876] MTCP thread 0 finished.
[mtcp_free_context:1405] MTCP thread 0 joined.
[mtcp_destroy:1685] All MTCP threads are joined.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant