90 lines
3.5 KiB
Plaintext
90 lines
3.5 KiB
Plaintext
========================================================================
|
|
USAGE OF EXAMPLE APPLICATIONS
|
|
========================================================================
|
|
|
|
epserver: a simple mtcp-epoll-based web server
|
|
Single-Process, Multi-threaded Usage:
|
|
./epserver -p www_home -f epserver.conf [-N #cores]
|
|
ex) ./epserver -p /home/notav/www -f epserver.conf -N 8
|
|
|
|
Multi-Process, Single-threaded Usage [DPDK-only]
|
|
(Master runs on core 0 by default, Slave processes on core 1~N)
|
|
ex) ./epserver -p /home/notav/www -f epserver-multiprocess.conf -c 0
|
|
for i in {1..7}
|
|
do
|
|
./epserver -p /home/notav/www -f epserver-mutliprocess.conf -c $i
|
|
done
|
|
|
|
|
|
options:
|
|
www_home: the directory to server. # max files are limited to
|
|
MAX_FILES in epserver.c:36
|
|
-N: number of CPU cores to use. default: all existing cores
|
|
-p: path to www/ files
|
|
-f: path to mtcp configuration file
|
|
-c: the core_id on which the process should run
|
|
[only works for multi-process mode]
|
|
|
|
========================================================================
|
|
|
|
epwget: simple mtcp-epoll-based http request generator
|
|
Single-Process, Multi-threaded Usage:
|
|
usage: ./epwget URL #requests [-N #cores] [-c concurrency] -f $mtcp_conf
|
|
ex) ./epwget 10.0.0.43/example.txt 10000000 -N 8 -c 8000 -f epwget.conf
|
|
|
|
Multi-Process, Single-threaded Usage [DPDK-only]
|
|
(Master runs on core 0 by default, Slave processes on core 1~N)
|
|
usage: ./epwget URL #requests -n $core [-c concurrency] -f $mtcp_conf
|
|
ex) ./epwget 10.0.0.43/example.txt 10000000 -n 0 -c 1000 -f epwget-multiprocess.conf
|
|
for i in {1..7}
|
|
do
|
|
./epwget 10.0.0.43/example.txt 1000000 -n $i -c 1000 -f epwget-multiprocess.conf
|
|
done
|
|
|
|
options:
|
|
URL: url of the content to download.
|
|
#requests: number of requests to generate
|
|
-N: number of CPU cores to use. default: min(# cores, # requests)
|
|
-c: number of maximum concurrent connections. default: 100
|
|
-f: path to mtcp configuration file
|
|
-n: the core_id on which the process should run
|
|
[only works for multi-process mode]
|
|
|
|
notes:
|
|
- epwget can use a range of IP addresses for larger concurrent
|
|
connections that cannot be in an IP. you can set it in epwget.c:33.
|
|
- epwget overrides some part of the settings in epgwet.conf and uses
|
|
mtcp_setconf() internally to apply the input arguments to the
|
|
configuration.
|
|
|
|
========================================================================
|
|
|
|
ONVM setups:
|
|
The config file provides simple onvm mtcp setups such as:
|
|
- simple endpoint server
|
|
- Enable `io = onvm`, and `onvm_serv = 1` in epserver.conf
|
|
- Run onvm
|
|
$ onvm/go.sh 1,2,3 1 -s stdout
|
|
- Run epserver
|
|
$ sudo ./epserver -p /path/to/www -f epserver.conf -N 1
|
|
- local client/server setup
|
|
- Enable `io = onvm`, `onvm_serv` = 1, and `onvm_dest = 2` in epserver.conf
|
|
- Enable `io = onvm`, `onvm_serv` = 2, and `onvm_dest = 1` in epwget.conf
|
|
- Run onvm
|
|
$ onvm/go.sh 1,2,3 1 -s stdout
|
|
- Run epserver
|
|
$ sudo ./epserver -p /path/to/www -f epserver.conf -N 1
|
|
- Run epwget
|
|
$ sudo ./epwget $SERVER_IP/foo.html 10000000 -N 1 -c 1024 -f epwget.conf
|
|
|
|
|
|
PLEASE NOTE THAT YOU WILL HAVE TO ADD STATIC ARP TABLE ENTRIES TO RUN
|
|
MTCP IN ONVM MODE.
|
|
|
|
========================================================================
|
|
|
|
Contact: mtcp-user at list.ndsl.kaist.edu
|
|
April 2, 2014.
|
|
EunYoung Jeong <notav at ndsl.kaist.edu>
|
|
M. Asim Jamshed <ajamshed at ndsl.kaist.edu>
|