NOTICE: there are some modification in this introduction (Last Update Feb.18)
Due day is postponed: Feb. 24, 5:00pm
As mentioned, the server_load is a variable rate, in the rate_file in the client machine. Each line has two numbers: a server_load for entire cluster and a duration. In our project, the duration is 1 sec. Then, the client sends out requests based on the server_load for the duration.
The server_load can not exceed the number of requests that a server is able to handle. In our mate cluster, the maximum workload for each server is 250 req/sec.
For individual work, the number of servers in this project is 10. So you can use rate_file_individual.txt directly in your experiments.
For group work, you must figure out the optimal number of servers and clients in the cluster. So you should scale the rate_file_group.txt by using maximum workload for each server (250req/sec). Rates in this file are based on two servers, each server has 750req/sec maximum workload, so the maximum value in the first column is 750*2=1500. You can scale your rates by
rate in this file * maximum load for mate server (250 req/sec) * # of servers / 1500.
Make sure you are using the newest powerworkload.txt file in your experiments (Has been claimed in email on Feb. 16)
Feb.8
Introduction to Apache
In Apache.tar package:
servers configure files for FrontEnd to take these machines as servers. They will be read in by mod_on_off module. You can change "time shutdown" and "time wakeup" in these files. For individual work, they are should be 0. But for group work, you must take them as variables to design your algorithm.
mm-1.3.1 shared memory library. It has been already installed on the clusters in advanced.
mod_backhand-1.2.2-new allows seamless redirection of HTTP requests from one web server to another. You will implement your distributed algorithm in this folder, in builtins.c.
mod_cpufreq-new when a request arrives, the function in this module named cpufreq_post_read_request() will be called.
mod_on_off-new implement turn on/off algorithm here.
Installation of Apache
The shared memory library has been installed for this project in advanced. What you are expected to install are Apache and FrontEnd. (I will use the path "/afs/cs.pitt.edu/changliu/public/project" and "/tmp/changliu" as examples in the following introduction.)
For each machine (l1.mate.cs.pitt.edu ~ l15.mate.cs.pitt.edu), you must do:
Logon the machine by your cs account.
Copy apache.tar file you get from the project webpage into one of your folder. (e.g. for me, it's: /afs/cs.pitt.edu/changliu/public/project)
untar apache.tar. By doing this, there will be a new folder named "apache" under your assigned path. (e.g. /afs/cs.pitt.edu/changliu/public/project/apache) After untar apache.tar, all source codes for installation are in "apache" folder.
untar command: tar -xvf apache.tar
Before you install Apache, You must do the following modifications in the reinstall scripts. And Make sure that you don't run any reinstall scripts on two different machines at the same time.
1. /apache/reinstall
1) Change Apache installation path "/tmp/changliu" into "/tmp/yourusername"(in Line 2). (Here, yourusername means the cs account you used to log in, such as changliu. )
2) Change Apache source code path "/afs/cs.pitt.edu/usr0/changliu/apache" into your source code folder (in Line 1).
2. /apache/reinstall-front-end
1) Change Apache FrontEnd installation path "/tmp/changliu" into "/tmp/yourusername", in Line 2. (Here, yourusername means the cs account you used to log in, such as changliu)
2) Change Apache source code path "/afs/cs.pitt.edu/usr0/changliu/apache" into your source code folder, in Line 1.
3. /apache/mod_cpufreq-new/install
1) Change "/tmp/changliu" into "/tmp/yourusername"
4. /apache/mod_on_off-new/install
1) Change "/tmp/changliu" into "/tmp/yourusername"
5. /apache/httpd.conf.frontend.save
1) Change all "/tmp/changliu" into "/tmp/yourusername"in Line 18, 63, 74, 80, 88, 99, 100, 312, 337, 448, 474, 526, 548, 573, 579, 580, 586, 633, 635, 646, 648, 663, 666, 669.
2) Change the PortNo. in Line 265 from 1024 to your assigned No. (don't set to others' PortNo.)
3) Change the PortNo. in "MulticastStats 130.49.223.255:4445" in Line 532 from 4445 to your assigned No. (don't set to others' PortNo.)
6. /apache/httpd.conf.save
1) Change all "/tmp/changliu" into "/tmp/yourusername" in Line 18, 64, 75, 81, 89, 100, 101, 314, 339, 443, 469, 521, 543, 568, 574, 575, 581, 628, 630, 641, 643, 658, 661, 664.
2) Change the PortNo. in Line 267 from 1024 to your assigned No. (don't set to others' PortNo.)
3) Change the PortNo. in MulticastStats 130.49.223.255:4445 in line 526 from 4445 to your assigned No. (don't set to others' PortNo.)
Don't use port number not assigned to you in the above two files.
change the current path to the path where your source code for Apache is. E.g. /afs/cs.pitt.edu/usr0/changliu/public/project/apache. By using command "cd "
run reinstall script in your source code folder, make sure you see the information for successful installation:
./reinstall
(if you get error in this command, you may want to run "csh reinstall" since your shell is not csh.)
Run "reinstall" on each machine
Now, you must install FrontEnd on l1.mate.cs.pitt.edu.
./reinstall-front-end
(again, if you get error in this command, you may want to run "csh reinstall-front-end" since your shell is not csh.)
After successful installation, you will see the installed path for Apache from its output information. And using the following command to run Apache on each machine (e.g. l1.mate.cs.pitt.edu)
/tmp/username/bin/apachectl start (e.g. /tmp/changliu/apache/bin/apachectl start)
to start Apache on the current machine.
if you want to stop Apache, you should use "/tmp/username/bin/apachectl stop" to stop the Apache on the current machine which you run this command on.
you can go to this webpage "http://l1.mate.cs.pitt.edu:1024/backhand/"(l1~l15) and will see Apache is online. Webpage for FrontEnd lists status information for all servers. But webpages for servers don't list that.
re-run ./reinstall and ./reinstall-front-end scripts after your modifications for codes.