blob: f452c8a6123438c4a087f6df9dcbd6cd5d7f377f [file] [log] [blame]
EunYoung Jeong209e31c2014-04-01 13:38:04 +09001========================================================================
2 README for mTCP
3========================================================================
4
5mTCP is a highly scalable user-level TCP stack for multicore systems.
6mTCP source code is distributed under the Modified BSD License. For
7more detail, please refer to the LICENSE. The license term of io_engine
8driver and ported applications may differ from the mTCPs.
9
10========================================================================
11 PREREQUISITE
12========================================================================
13
14We require the following libraries to run mTCP.
15 - libps (PacketShader I/O engine library)
16 - libnuma
17 - libpthread
18 - librt
EunYoung Jeong57cace82014-04-15 10:40:13 +090019
20Compling PSIO driver requires kernel headers.
EunYoung Jeong209e31c2014-04-01 13:38:04 +090021 - For Debian/Ubuntu, try apt-get install linux-headers-$(uname -r)
22
EunYoung Jeong57cace82014-04-15 10:40:13 +090023** PSIO requires Intel 82599-based 10 GbE cards and Linux 2.6 kernel **
24 = Please refer to http://shader.kaist.edu/packetshader/io_engine/
25
EunYoung Jeong209e31c2014-04-01 13:38:04 +090026========================================================================
27 INCLUDED DIRECTORIES
28========================================================================
29
30mtcp - mtcp source code directory
31mtcp/src - source code
32mtcp/src/include - mTCPs internal header files
33mtcp/lib - library file
34mtcp/include - header files that applications will use
35
36io_engine - event-driven packet I/O engine (io_engine)
37io_engine/driver - driver source code
38io_engine/lib - io_engine library
39io_engine/include - io_engine header files
40io_engine/samples - sample io_engine applications (not mTCPs)
41
42apps - mTCP applications
43apps/example - example applications (see README)
44apps/lighttpd-1.4.32 - mTCP-ported lighttpd (see INSTALL)
45apps/apache_benchmark - mTCP-ported apach benchmark (ab) (see README-mtcp)
46
47util - useful source code for applications
48
49config - sample mTCP configuration files (may not be necessary)
50
51========================================================================
52 INSTALL GUIDES
53========================================================================
54
551. make in io_engine/driver
56 - check ps_ixgbe.ko
57
582. install the driver
59 - ./install.py <# cores> <# cores>
EunYoung Jeong57cace82014-04-15 10:40:13 +090060 - refer to http://shader.kaist.edu/packetshader/io_engine/
EunYoung Jeong209e31c2014-04-01 13:38:04 +090061 - you may need to change the ip address in install.py:46
62
633. make in io_engine/lib
64 - check libps.a
65
664. make in mtcp/src
67 - check libmtcp.a in mtcp/lib
68 - check header files in mtcp/include
69
705. make in apps/example
71 - check example binary files
72
736. Check the configurations
74 - epserver.conf for server-side configuration
75 - epwget.conf for client-side configuration
76 - you may write your own configuration file for your application
77
787. Run the applications!
79
80========================================================================
81 TESTED ENVIRONMENTS
82========================================================================
83
84mTCP runs on Linux-2.6-based operating systems with generic x86_64 CPUs,
85but to help evaluation, we provide our tested environments as follows.
86
87Intel Xeon E5-2690 octacore CPU @ 2.90 GHz
8832 GB of RAM (4 memory channels)
8910 GbE NIC with Intel 82599 chipset (specifically Intel X520-DA2)
90Debian 6.0.7 (Linux 2.6.32-5-amd64)
91
92Intel Core i7-3770 quadcore CPU @ 3.40 GHz
9316 GB of RAM (2 memory channels)
9410 GbE NIC with Intel 82599 chipset (specifically Intel X520-DA2)
95Ubuntu 10.04 (Linux 2.6.32-47)
96
97Event-driven PacketShader I/O engine (extended io_engine-0.2)
98 - PSIO is currently only compatible with Linux-2.6.
99
100========================================================================
101 NOTES
102========================================================================
103
1041. mTCP currently runs with fixed memory pools. That means, the size of
105 TCP receive and send buffers are fixed at the startup and does not
106 increase dynamically. This could be performance limit to the large
107 long-lived connections. Be sure to configure the buffer size
108 appropriately to your size of workload.
109
1102. The client side of mTCP supports mtcp_init_rss() to create an
111 address pool that can be used to fetch available address space in
112 O(1). To easily congest the server side, this function should be
113 called at the application startup.
114
1153. mTCP currently supports only 1 listening socket per an mTCP thread.
116
1174. The supported socket options are limited for right now. Please refer
118 to the mtcp/src/api.c for more detail.
119
1205. The counterpart of mTCP should enable TCP timestamp.
121
122========================================================================
123 FREQUENTLY ASKED QUESTIONS
124========================================================================
125
EunYoung Jeongacd689d2014-04-02 22:28:29 +09001261. How can I quit the application?
127 - Use ^C to gracefully shutdown the application. Two consecutive
128 ^C (separated by 1 sec) will force quit.
129
1302. My application keeps printing "No route to 0.0.0.0"
EunYoung Jeong209e31c2014-04-01 13:38:04 +0900131 - Try to turn off your network-manager for xge*. The network manager
132 can override the IP configuration set by install.py in PSIO driver.
133
EunYoung Jeongacd689d2014-04-02 22:28:29 +09001343. Can I statically set the routing or arp table?
EunYoung Jeong209e31c2014-04-01 13:38:04 +0900135 - Yes, mTCP allows static route and arp configuration. Go to the
136 config directory and see sample_route.conf or sample_arp.conf.
137 Copy and adapt it to your condition and link (ln -s) the config
138 directory to the application directory. mTCP will find
139 config/route.conf and config/arp.conf for static configuration.
140
141========================================================================
EunYoung Jeongacd689d2014-04-02 22:28:29 +0900142 CAUTION
143========================================================================
144
1451. Do not remove ps_ixgbe driver while running mTCP applications. The
146 application will go panic.
147
1482. Use the ps_ixgbe driver contained in this package, not the one from
149 some other place (e.g., from io_engine github).
150
151========================================================================
EunYoung Jeong209e31c2014-04-01 13:38:04 +0900152
153 Contact: mtcp at list.ndsl.kaist.edu
154 April 2, 2014.
155 EunYoung Jeong <notav at ndsl.kaist.edu>