Skip to content

Commit

Permalink
- Simplified mTCP configuration interface a bit.
Browse files Browse the repository at this point in the history
	-> max_concurrency & max_num_buffers arguments are pre-set to 10,000 (per core) by default.
	-> no need to change it in the mtcp.conf file.
  • Loading branch information
ajamshed committed Jun 5, 2018
1 parent 88463f9 commit 37a19ff
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 26 deletions.
8 changes: 4 additions & 4 deletions apps/example/epserver-multiprocess.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ port = dpdk0
#port = dpdk0:0
#port = dpdk0:1

# Maximum concurrency per core
max_concurrency = 10000
# Maximum concurrency per core (default = 10000)
#max_concurrency = 10000

# Maximum number of socket buffers per core
# Maximum number of socket buffers per core (default = 10000)
# Set this to small value if there are many idle connections
max_num_buffers = 10000
#max_num_buffers = 10000

# Receive buffer size of sockets; if not set: rcvbuf = sndbuf
rcvbuf = 8192
Expand Down
8 changes: 4 additions & 4 deletions apps/example/epserver.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ port = dpdk0
#port = dpdk0:0
#port = dpdk0:1

# Maximum concurrency per core
max_concurrency = 10000
# Maximum concurrency per core (default = 10000)
#max_concurrency = 10000

# Maximum number of socket buffers per core
# Maximum number of socket buffers per core (default = 10000)
# Set this to small value if there are many idle connections
max_num_buffers = 10000
#max_num_buffers = 10000

# Receive buffer size of sockets; if not set: rcvbuf = sndbuf
rcvbuf = 8192
Expand Down
8 changes: 4 additions & 4 deletions apps/example/epwget-multiprocess.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ port = dpdk0
#port = dpdk0:0
#port = dpdk0:1

# Maximum concurrency per core
max_concurrency = 10000
# Maximum concurrency per core (default = 10000)
#max_concurrency = 10000

# Maximum number of socket buffers per core
# Maximum number of socket buffers per core (default = 10000)
# Set this to small value if there are many idle connections
max_num_buffers = 10000
#max_num_buffers = 10000

# Receive buffer size of sockets; if not set: rcvbuf = sndbuf
rcvbuf = 8192
Expand Down
8 changes: 4 additions & 4 deletions apps/example/epwget.conf
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ sndbuf = 8192

# if sndbuf & rcvbuf not set: sndbuf = rcvbuf = 8192

# Maximum concurrency per core
max_concurrency = 10000
# Maximum concurrency per core (default = 10000)
#max_concurrency = 10000

# Maximum number of socket buffers per core
# Maximum number of socket buffers per core (default = 10000)
# Set this to small value if there are many idle connections
max_num_buffers = 10000
#max_num_buffers = 10000

# TCO timeout seconds
# (tcp_timeout = -1 can disable the timeout check)
Expand Down
8 changes: 4 additions & 4 deletions apps/lighttpd-1.4.32/src/mtcp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ port = dpdk0
#port = dpdk0:0
#port = dpdk0:1

# Maximum concurrency per core
max_concurrency = 10000
# Maximum concurrency per core (default = 10000)
max_concurrency = 8192

# Maximum number of socket buffers per core
# Maximum number of socket buffers per core (default = 10000)
# Set this to small value if there are many idle connections
max_num_buffers = 10000
max_num_buffers = 8192

# Receive buffer size of sockets; if not set: rcvbuf = sndbuf
rcvbuf = 8192
Expand Down
8 changes: 4 additions & 4 deletions config/sample_mtcp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ port = dpdk0
#port = dpdk0
#port = dpdk1

# Maximum concurrency per core
max_concurrency = 10000
# Maximum concurrency per core (default = 10000)
#max_concurrency = 10000

# Maximum number of socket buffers per core
# Maximum number of socket buffers per core (default = 10000)
# Set this to small value if there are many idle connections
max_num_buffers = 10000
#max_num_buffers = 10000

# Receive buffer size of sockets; if not set: rcvbuf = sndbuf
rcvbuf = 8192
Expand Down
4 changes: 2 additions & 2 deletions mtcp/src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,8 +645,8 @@ LoadConfiguration(const char *fname)

/* set default configuration */
CONFIG.num_cores = num_cpus;
CONFIG.max_concurrency = 100000;
CONFIG.max_num_buffers = 100000;
CONFIG.max_concurrency = 10000;
CONFIG.max_num_buffers = 10000;
CONFIG.rcvbuf_size = -1;
CONFIG.sndbuf_size = -1;
CONFIG.tcp_timeout = TCP_TIMEOUT;
Expand Down

0 comments on commit 37a19ff

Please sign in to comment.