aboutsummaryrefslogtreecommitdiffstats
path: root/app/nginx/conf/nginx-tldk.conf
diff options
context:
space:
mode:
authorKonstantin Ananyev <konstantin.ananyev@intel.com>2017-10-31 12:40:17 +0000
committerKonstantin Ananyev <konstantin.ananyev@intel.com>2017-10-31 14:19:39 +0000
commite18a033b921d0d79fa8278f853548e6125b93e0c (patch)
treea6a55edf6ddceef824561818c9836914c326340d /app/nginx/conf/nginx-tldk.conf
parent7e18fa1bf263822c46d7431a911b41d6377d5f69 (diff)
Integrate TLDK with NGINX
Created a clone of nginx (from https://github.com/nginx/nginx) to demonstrate and benchmark TLDK library integrated with real world application. A new nginx module is created and and BSD socket-like API is implemented on top of native TLDK API. Note, that right now only minimalistic subset of socket-like API is provided: - accept - close - readv - recv - writev so only limited nginx functionality is available for a moment. Change-Id: Ie1efe9349a0538da4348a48fb8306cbf636b5a92 Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com> Signed-off-by: Reshma Pattan <reshma.pattan@intel.com> Signed-off-by: Remy Horton <remy.horton@intel.com> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Diffstat (limited to 'app/nginx/conf/nginx-tldk.conf')
-rw-r--r--app/nginx/conf/nginx-tldk.conf83
1 files changed, 83 insertions, 0 deletions
diff --git a/app/nginx/conf/nginx-tldk.conf b/app/nginx/conf/nginx-tldk.conf
new file mode 100644
index 0000000..27d6b8a
--- /dev/null
+++ b/app/nginx/conf/nginx-tldk.conf
@@ -0,0 +1,83 @@
+
+user root;
+worker_processes 2;
+
+# run nginx workers on cpus 5-6.
+worker_cpu_affinity 100000 1000000;
+
+#with TLDK daemon mode is not supported right now.
+daemon off;
+
+pid /local/nginx.cfg/logs/nginx.pid;
+
+events {
+ use epoll;
+ worker_connections 10240;
+ accept_mutex off;
+}
+
+http {
+ include mime.types;
+ default_type application/octet-stream;
+
+ access_log off;
+ error_log /local/nginx.cfg/logs/error.log emerg;
+
+ #with TLDK sendfile is not supported right now.
+ sendfile off;
+
+ keepalive_timeout 0;
+ keepalive_requests 0;
+
+ output_buffers 1 2m;
+
+ open_file_cache max=20000 inactive=1h;
+ open_file_cache_valid 1h;
+ open_file_cache_min_uses 1;
+ open_file_cache_errors on;
+
+
+ server {
+ listen 6000 backlog=4096;
+ server_name www.xz1;
+ location / {
+ root /local/nginx.cfg/html;
+ index index.html index.htm;
+ }
+ }
+}
+
+tldk_main {
+ #create 2 DPDK slave lcores on cpus 9-10.
+ eal_cmd --lcores=8-10 -n 4;
+ port 0 rx_offload 0xf tx_offload 0xf ipv4 192.168.1.60;
+}
+
+tldk_ctx {
+ worker 0;
+ lcore 9;
+ # for benchmarking purposes set TCP TIMEWAIT to zero.
+ tcp_timewait 0;
+ # remove next line to make TLDK back-end to run a DPDK slave lcore 9
+ # within nginx master process.
+ be_in_worker;
+ mbufs 0x20000;
+ streams 0x8000;
+ sbufs 0x100;
+ rbufs 0x800;
+ dev 0 port 0 queue 0;
+ dest dev 0 addr 192.168.1.0 masklen 24 mac 3C:FD:FE:9F:D1:E1;
+}
+
+tldk_ctx {
+ worker 1;
+ lcore 10;
+ tcp_timewait 0;
+ be_in_worker;
+ mbufs 0x20000;
+ streams 0x8000;
+ sbufs 0x100;
+ rbufs 0x800;
+ dev 0 port 0 queue 1;
+ dest dev 0 addr 192.168.1.0 masklen 24 mac 3C:FD:FE:9F:D1:E1;
+}