========================================================================
 README for ab
========================================================================

We provide ApachBenchmark to ease benchmarking against mTCP-based 
servers. This package only contains the source code of ab and required 
APR library, not the full code of Apach Server Project. We patched 
ab to be multi-threaded and to be scalable to make use of multicore 
systems. See the section "Usage" for detailed instruction for using it.

========================================================================
 Configuration
========================================================================

If you want to use ab with mTCP, 
  run configure with "--with-libmtcp" option.

-FOR DPDK VERSION-
 $ ./configure --with-libmtcp=${PATH_TO_LIBMTCP} \
    --with-libdpdk=${PATH_TO_LIBDPDK}

-FOR PSIO VERSION-
 $ ./configure --with-libmtcp=${PATH_TO_LIBMTCP} \
    --with-libpsio=${PATH_TO_LIBPSIO}

  (e.g.
	$ ./configure CFLAGS="-g -O3" \
	--with-libmtcp="<$PATH_TO_MTCP_RELEASE_V3>/mtcp/" \
	--with-libdpdk="<$PATH_TO_MTCP_RELEASE_V3>/$RTE_SDK/$RTE_TARGET"
  )

-FOR NETMAP VERSION-
 $ ./configure --with-libmtcp=${PATH_TO_LIBMTCP}

Without this option, you can use multi-threaded version of ab.

 $ ./configure

========================================================================
 Compilation
========================================================================

To use ab, execute "make" at this root directory.
The ab will be generated in support/.

========================================================================
 Usage
========================================================================

The options that we added for mTCP-version and multi-threaded version:
 -N cores : Number of cores to use. 
            This should be greater than the # concurrency.
 -l ports : Number of TCP ports to use. It can be used when you wish to 
            use different port for different flows. Port number starts 
            from 80, so when you give '-l 4' option, ab will use port 
            80, 81, 82, and 83.

All other options are listed when you execute ab without any argument.

Example:
$ ./ab -N 8 -c 1000 -n 10000000 10.0.0.43/test.txt

Note that the mtcp configuration file should be located at 
config/mtcp.conf where your ab binary lies.

========================================================================

                   Contact: mtcp-user at list.ndsl.kaist.edu
                               April 2, 2014. 
                    Haewon Jeong <addie at kaist.ac.kr>
		Muhammad Asim Jamshed <ajamshed at ndsl.kaist.edu>
