EunYoung Jeong | 209e31c | 2014-04-01 13:38:04 +0900 | [diff] [blame] | 1 | ======================================================================== |
| 2 | README for mTCP |
| 3 | ======================================================================== |
| 4 | |
| 5 | mTCP is a highly scalable user-level TCP stack for multicore systems. |
| 6 | mTCP source code is distributed under the Modified BSD License. For |
| 7 | more detail, please refer to the LICENSE. The license term of io_engine |
| 8 | driver and ported applications may differ from the mTCP’s. |
| 9 | |
| 10 | ======================================================================== |
| 11 | PREREQUISITE |
| 12 | ======================================================================== |
| 13 | |
| 14 | We require the following libraries to run mTCP. |
| 15 | - libps (PacketShader I/O engine library) |
| 16 | - libnuma |
| 17 | - libpthread |
| 18 | - librt |
EunYoung Jeong | 57cace8 | 2014-04-15 10:40:13 +0900 | [diff] [blame^] | 19 | |
| 20 | Compling PSIO driver requires kernel headers. |
EunYoung Jeong | 209e31c | 2014-04-01 13:38:04 +0900 | [diff] [blame] | 21 | - For Debian/Ubuntu, try apt-get install linux-headers-$(uname -r) |
| 22 | |
EunYoung Jeong | 57cace8 | 2014-04-15 10:40:13 +0900 | [diff] [blame^] | 23 | ** 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 Jeong | 209e31c | 2014-04-01 13:38:04 +0900 | [diff] [blame] | 26 | ======================================================================== |
| 27 | INCLUDED DIRECTORIES |
| 28 | ======================================================================== |
| 29 | |
| 30 | mtcp - mtcp source code directory |
| 31 | mtcp/src - source code |
| 32 | mtcp/src/include - mTCP’s internal header files |
| 33 | mtcp/lib - library file |
| 34 | mtcp/include - header files that applications will use |
| 35 | |
| 36 | io_engine - event-driven packet I/O engine (io_engine) |
| 37 | io_engine/driver - driver source code |
| 38 | io_engine/lib - io_engine library |
| 39 | io_engine/include - io_engine header files |
| 40 | io_engine/samples - sample io_engine applications (not mTCP’s) |
| 41 | |
| 42 | apps - mTCP applications |
| 43 | apps/example - example applications (see README) |
| 44 | apps/lighttpd-1.4.32 - mTCP-ported lighttpd (see INSTALL) |
| 45 | apps/apache_benchmark - mTCP-ported apach benchmark (ab) (see README-mtcp) |
| 46 | |
| 47 | util - useful source code for applications |
| 48 | |
| 49 | config - sample mTCP configuration files (may not be necessary) |
| 50 | |
| 51 | ======================================================================== |
| 52 | INSTALL GUIDES |
| 53 | ======================================================================== |
| 54 | |
| 55 | 1. make in io_engine/driver |
| 56 | - check ps_ixgbe.ko |
| 57 | |
| 58 | 2. install the driver |
| 59 | - ./install.py <# cores> <# cores> |
EunYoung Jeong | 57cace8 | 2014-04-15 10:40:13 +0900 | [diff] [blame^] | 60 | - refer to http://shader.kaist.edu/packetshader/io_engine/ |
EunYoung Jeong | 209e31c | 2014-04-01 13:38:04 +0900 | [diff] [blame] | 61 | - you may need to change the ip address in install.py:46 |
| 62 | |
| 63 | 3. make in io_engine/lib |
| 64 | - check libps.a |
| 65 | |
| 66 | 4. make in mtcp/src |
| 67 | - check libmtcp.a in mtcp/lib |
| 68 | - check header files in mtcp/include |
| 69 | |
| 70 | 5. make in apps/example |
| 71 | - check example binary files |
| 72 | |
| 73 | 6. 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 | |
| 78 | 7. Run the applications! |
| 79 | |
| 80 | ======================================================================== |
| 81 | TESTED ENVIRONMENTS |
| 82 | ======================================================================== |
| 83 | |
| 84 | mTCP runs on Linux-2.6-based operating systems with generic x86_64 CPUs, |
| 85 | but to help evaluation, we provide our tested environments as follows. |
| 86 | |
| 87 | Intel Xeon E5-2690 octacore CPU @ 2.90 GHz |
| 88 | 32 GB of RAM (4 memory channels) |
| 89 | 10 GbE NIC with Intel 82599 chipset (specifically Intel X520-DA2) |
| 90 | Debian 6.0.7 (Linux 2.6.32-5-amd64) |
| 91 | |
| 92 | Intel Core i7-3770 quadcore CPU @ 3.40 GHz |
| 93 | 16 GB of RAM (2 memory channels) |
| 94 | 10 GbE NIC with Intel 82599 chipset (specifically Intel X520-DA2) |
| 95 | Ubuntu 10.04 (Linux 2.6.32-47) |
| 96 | |
| 97 | Event-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 | |
| 104 | 1. 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 | |
| 110 | 2. 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 | |
| 115 | 3. mTCP currently supports only 1 listening socket per an mTCP thread. |
| 116 | |
| 117 | 4. The supported socket options are limited for right now. Please refer |
| 118 | to the mtcp/src/api.c for more detail. |
| 119 | |
| 120 | 5. The counterpart of mTCP should enable TCP timestamp. |
| 121 | |
| 122 | ======================================================================== |
| 123 | FREQUENTLY ASKED QUESTIONS |
| 124 | ======================================================================== |
| 125 | |
EunYoung Jeong | acd689d | 2014-04-02 22:28:29 +0900 | [diff] [blame] | 126 | 1. 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 | |
| 130 | 2. My application keeps printing "No route to 0.0.0.0" |
EunYoung Jeong | 209e31c | 2014-04-01 13:38:04 +0900 | [diff] [blame] | 131 | - 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 Jeong | acd689d | 2014-04-02 22:28:29 +0900 | [diff] [blame] | 134 | 3. Can I statically set the routing or arp table? |
EunYoung Jeong | 209e31c | 2014-04-01 13:38:04 +0900 | [diff] [blame] | 135 | - 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 Jeong | acd689d | 2014-04-02 22:28:29 +0900 | [diff] [blame] | 142 | CAUTION |
| 143 | ======================================================================== |
| 144 | |
| 145 | 1. Do not remove ps_ixgbe driver while running mTCP applications. The |
| 146 | application will go panic. |
| 147 | |
| 148 | 2. 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 Jeong | 209e31c | 2014-04-01 13:38:04 +0900 | [diff] [blame] | 152 | |
| 153 | Contact: mtcp at list.ndsl.kaist.edu |
| 154 | April 2, 2014. |
| 155 | EunYoung Jeong <notav at ndsl.kaist.edu> |