Difference between revisions of "Running Timer Code"

From Earlham CS Department
Jump to navigation Jump to search
(Using run_test.sh)
(Obtaining Kernel Timing Data)
Line 3: Line 3:
  
 
===Setup a client and server with the tp_timer kernel===
 
===Setup a client and server with the tp_timer kernel===
tp_timer should be compiled in module format (simply copy the -mod config below, as indicated).
+
If you already have a client and server running the proper kernel, skip to the[[#Check_out_and_run_the_test_script|next section]].  tp_timer should be compiled in module format (simply copy the -mod config below, as indicated).
  
 
'''1. Build and install the kernel.'''
 
'''1. Build and install the kernel.'''

Revision as of 02:24, 22 November 2005

Obtaining Kernel Timing Data

Testing is now radically simplified with the run_test.sh script.

Setup a client and server with the tp_timer kernel

If you already have a client and server running the proper kernel, skip to thenext section. tp_timer should be compiled in module format (simply copy the -mod config below, as indicated).

1. Build and install the kernel.

cvs co llk-sources
cd llk-sources
cp ccg-configs/<machine>-mod .config # where machine is 'cairo' or 'bazaar'
make oldconfig
make -jN CC="ccache gcc"
./ikl.py # ikl = install kernel locally

2. Setup the boot-loader

# on cairo:
vim /etc/yaboot.conf
ybin -v

# on bazaar:
vim /boot/grub/menu.lst
grub < /etc/grub.conf

3. Reboot.

reboot

Check out and run the test script

This must be done on a non-testing node, e.g., hopper. If you run this on a node you're using to test and accidently touch NFS, the machine will crash.

cvs co llk
cd llk/scripts
./run_test.sh <client> <server> <protocol> <table name> <test set>

Where <client> and <server> are short host names like 'b10' and the protocol is 'udp' or 'tcp'.

Older info

Basic Flow:

  1. make sure the tp_timer module is installed and working on the client and server nodes
  2. clear /proc/tp_timer on both client and server machines (just read its contents; cat /proc/tp_timer > /dev/null)
  3. run pacgen on client and server to amass new data.
  4. read data into log files on both server and client
  5. load data from the log files into database
  6. look at data via php scripts


Machines setup with llk timing: b10,b11,c10,c11

Need to check out from CVS:

  • llk-pacgen - cvs module with modified pacgen


To compile the kernel copy in a .config file from the ccg-configs cvs. Make sure that CONFIG_TP_TIMER=y (for tp_timer built in) or CONFIG_TP_TIMER=m (for a module version of tp_timer). And, checkout llk-sources. Note that there is a significant chance that this compilation will crash the machine running tp_timer (having the module unloaded is OK). This is probably a problem with NFS so building it locally may work. Otherwise, you may not want to compile the module on the machine you want to test with. Next, use standard machine dependent kernel build and install instructions:
make; make modules_install
Copy the results of this to the target machine if it is not the local machine. Update, grub or yaboot, build initrd if that is needed, and reboot. If you have loaded it as a module you must modprobe tp_timer after boot in order to install the module. The first some number of packets from pacgen will be used to calibrate the timers. They should not be used for data.

pacgen sample commands:

./server tcp <port number>
./client -t <protocol> -s <source IP> -m <source port> -d <dest IP> -p <dest port>

Each window is a specific ID for the packet. This ID is used as the payload for the packets. Useful for checking for packet fragmentation (educated guess via Alex). Windows are 0xffffffff, 0xffffffff (2 unsigned ints worth of 1's), an unsigned int for socket/thread id (We don't use it; that part of the code was removed), and an unsigned int holding the window number (we don't know what this is for).

After pacgen is ran with on a tp timer enabled machine, the timing results will be available in /proc/tp_timer. Note that after you read this proc entry, the information will be cleared.


To enter the data into our database:

  1. Collect the /proc/tp_timer from the server node and the client node:
    1. cat /proc/tp_timer > tp_timer_client.log
  2. Execute the create-table-llk.pl script found in the the llk cvs module in the scripts sub directory.
    1. Usage: ./create-table-llk.pl <tablename> <label> <datafile> <client|server>
    2. If the table given by name to the scripts doesn't exist, the script creates the table.