aboutsummaryrefslogtreecommitdiffstats
path: root/configs
diff options
context:
space:
mode:
authorYu Ping <ping.yu@intel.com>2020-02-21 22:36:20 +0800
committerFlorin Coras <fcoras@cisco.com>2020-02-22 00:30:48 +0000
commit54346b61f91008c5098243b588f184ad92ad29c9 (patch)
tree60116fad568970aee2538a081de0560b0487db8c /configs
parent4b0794f139564682503fcd2f59c7bcd3238e6633 (diff)
initial version of VSAP
Signed-off-by: Yu Ping <ping.yu@intel.com> Change-Id: I04d9150f0c7607ba20de9096b452476eff1622fc
Diffstat (limited to 'configs')
-rw-r--r--configs/README6
-rw-r--r--configs/nginx.conf80
-rw-r--r--configs/startup.conf45
-rw-r--r--configs/vcl.conf17
-rw-r--r--configs/vppenvset3
5 files changed, 151 insertions, 0 deletions
diff --git a/configs/README b/configs/README
new file mode 100644
index 0000000..3f1f218
--- /dev/null
+++ b/configs/README
@@ -0,0 +1,6 @@
+VPP uses startup.conf and please remember to modify 'exec /path/to/configs/vppenvset' to your own setting.
+
+As for NGINX, if you just want to test small files, nginx.conf is a good choice. It supports 64B, 1KB and 2KB JSON files embedded in nginx.conf, meaning NGINX sends files from memory rather than disk to avoid file read cost.
+
+vcl.conf is used for both LDP NGINX and VCL NGINX. Note the rx-fifo-size and tx-fifo-size should be larger than file size you want to test. 'rx-fifo-size 5000' means the size of rx fifo of an app session is 5000 bytes.
+
diff --git a/configs/nginx.conf b/configs/nginx.conf
new file mode 100644
index 0000000..0466aeb
--- /dev/null
+++ b/configs/nginx.conf
@@ -0,0 +1,80 @@
+user xxx;
+worker_processes 1;
+
+master_process on;
+daemon off;
+
+worker_rlimit_nofile 10240;
+events {
+ use epoll;
+ worker_connections 10240;
+ accept_mutex off;
+ multi_accept off;
+}
+
+
+http {
+ access_log off;
+ include mime.types;
+ default_type application/octet-stream;
+ sendfile on;
+
+
+ ##RPS test
+ keepalive_timeout 300s;
+ keepalive_requests 1000000;
+
+ server {
+ listen 8000;
+ root /path/to/root/;
+ index index.html index.htm;
+ location /return {
+ return 204;
+ }
+ location /64B.json {
+ return 200 '{"status":"success","result":"this is a 64Byte json file test!"}';
+ }
+ location /1KB.json{
+ return 201 '{"status":"success","result":"\
+ Nanchang, which was the capital of Yuzhang Prefecture during the HanDynasty, \
+ now falls under the jurisdiction of Hongzhou. It straddles the borderof the \
+ influence of the Ye and Zhen constellations , and is adjacent to theHeng \
+ and the Lu mountains . The three rivers enfold it like the frontpart \
+ of a garment and the five lakes encircle it like a girdle. Itcontrols \
+ the savage Jing area and connects Ou and Yue, and itsproducts are \
+ nature’s jewels. The radiance of its legendary sword shootsdirectly upward \
+ between the constellations Niu and Dou. Its talented peopleare outstanding,\
+ and the spirit of intelligence pervades the place. This wasthe place where Xu \
+ Ru spent the night on his visit to Chen Fan (10). The mightyHongzhou spreads \
+ out immensely amid the fog, and the intellectual luminariesare as numerous as\
+ meteors chasing one another. \
+ "}';
+ }
+ location /2KB.json{
+ return 202 '{"status":"success","result":"\
+ Hello from NGINX, 2KB test\
+ Nanchang, which was the capital of Yuzhang Prefecture during the HanDynasty, \
+ now falls under the jurisdiction of Hongzhou. It straddles the borderof the \
+ influence of the Ye and Zhen constellations , and is adjacent to theHeng \
+ and the Lu mountains . The three rivers enfold it like the frontpart \
+ of a garment and the five lakes encircle it like a girdle. Itcontrols \
+ the savage Jing area and connects Ou and Yue, and itsproducts are \
+ nature’s jewels. The radiance of its legendary sword shootsdirectly upward \
+ between the constellations Niu and Dou. Its talented peopleare outstanding,\
+ and the spirit of intelligence pervades the place. This wasthe place where Xu \
+ Ru spent the night on his visit to Chen Fan (10). The mightyHongzhou spreads \
+ out immensely amid the fog, and the intellectual luminariesare as numerous as\
+ meteors chasing one another.\
+ of a garment and the five lakes encircle it like a girdle. Itcontrols \
+ the savage Jing area and connects Ou and Yue, and itsproducts are \
+ nature’s jewels. The radiance of its legendary sword shootsdirectly upward \
+ between the constellations Niu and Dou. Its talented peopleare outstanding,\
+ and the spirit of intelligence pervades the place. This wasthe place where Xu \
+ Ru spent the night on his visit to Chen Fan (10). The mightyHongzhou spreads \
+ out immensely amid the fog, and the intellectual luminariesare as numerous as\
+ meteors chasing one another. \
+ "}';
+ }
+
+ }
+ }
diff --git a/configs/startup.conf b/configs/startup.conf
new file mode 100644
index 0000000..b9260b4
--- /dev/null
+++ b/configs/startup.conf
@@ -0,0 +1,45 @@
+unix {
+ interactive
+ log /var/log/vpp/vpp.log
+ full-coredump
+ cli-listen /run/vpp/cli-vpp1.sock
+ exec /path/to/configs/vppenvset
+}
+
+api-trace {
+ on
+}
+
+session {
+ evt_qs_memfd_seg
+}
+
+socksvr {
+ socket-name /path/to/vpp-api.sock
+}
+
+cpu {
+ main-core 0
+ ##Start 4 VPP workers
+ #corelist-workers 1-4
+ ##start 1 VPP worker
+ corelist-workers 1
+}
+
+tcp {cc-algo cubic}
+
+dpdk {
+ dev <pci-address> {
+ name eth0
+
+ ##the value of num-rx-queues should be the same as the number
+ ##of VPP worker
+ ##If 1
+ num-rx-queues 1
+ ##If 4
+ #num-rx-queues 4
+ num-rx-desc 512
+ num-tx-desc 512
+
+ }
+}
diff --git a/configs/vcl.conf b/configs/vcl.conf
new file mode 100644
index 0000000..c6e7da9
--- /dev/null
+++ b/configs/vcl.conf
@@ -0,0 +1,17 @@
+vcl {
+##File size is no smaller than 1MB
+#rx-fifo-size 2200000
+#tx-fifo-size 2200000
+##File size is smaller than 1MB
+rx-fifo-size 5000
+tx-fifo-size 5000
+app-scope-local
+app-scope-global
+api-socket-name /path/to/vpp-api.sock
+event-queue-size 1000000
+segment-size 1024000000
+add-segment-size 1024000000
+vpp-api-q-length 65536
+max-workers 36
+#use-mq-eventfd
+}
diff --git a/configs/vppenvset b/configs/vppenvset
new file mode 100644
index 0000000..286434d
--- /dev/null
+++ b/configs/vppenvset
@@ -0,0 +1,3 @@
+set int state eth0 up
+set int ip address eth0 10.0.0.1/24
+session enable