EPFL 2015 Tutorial: Rigorous and Practical Server Design Evaluation
Hands-On Session Instructions
This section of the tutorial covers a demonstration of bringing up the CloudSuite workloads and performing architectural simulation using Flexus. The tutorial consists of four main parts: (1) CloudSuite on real hardware, running the media streaming workload as an example. (2) Using Simics to perform full-system simulation, porting media streaming into the simulated system and creating a Simics checkpoint. (3) Using the Flexus tools along with the sampling methodology to measure the performance of a workload. (4) An overview of the images we are releasing for CloudSuite and how to set them up on your own systems.
All the work required by this tutorial will be performed through secure connections to the PARSA servers at EPFL. On Unix-based machines, connection can be set up via the terminal application, and on Windows, connection can be set up via an SSH program that supports Xterm, such as Putty. (Please refer to this link to convert the ssh key to the Windows format and then this link to set up Putty with Xterm on your Windows machine. In putty, you need to specify the path to the key generated by PuttyGen under Connection, SSH, Auth using the Browse button.To connect to our server:
- Download the ssh keys for your given account
- Untar the file
- Change the permissions
- Then, ssh to the main server
- Finally, ssh to the node assigned to you
tar xvf tutorialN_keys.tar
chmod 600 tutorialN_keys/id_rsa
ssh -Y -i tutorialN_keys/id_rsa tutorialN@parsasrv2.epfl.ch
ssh -Y n1XX
CloudSuite on Real Hardware (Day 1)
In this part of the tutorial, you will go through the whole process of installing and running the media streaming workload. Before you start, you need to log in to your account from two terminals (or you can use screen), one for the client application and the other for the server application. Once you log in to your account (ssh), you will find the media streaming package under your home directory, streaming-release.
Media Streaming (+)
Preparing a Simics Checkpoint (Not in this tutorial)(+)
A Simics checkpoint is simply a snapshot of simulated machine state in the form of one or more CPU's worth of registers, a physical main memory image, and device state. Checkpoints allow us to stage and position our workloads without having to reboot the target machine over and over. When running Simics, the simulation of a target machine can be interrupted at any moment in order to save a checkpoint.
Installing Solaris in a simulated machine (+)
- The first step is to acquire the Solaris 10 CDROM ISO image, which is freely available for download from the Oracle web site. The specific edition of Solaris 10 we have tested with is Solaris 10 8/11, labeled as sol-10-u10-ga2-sparc. As of this writing, the DVD ISO image file that you should expect to have is: sol-10-u10-ga2-sparc-dvd.iso.
- The Simics package includes scripts to automate the installation of Solaris within a simulated target machine. These scripts can be found under the simics-3.0.22/targets directory. The specific target system that we use for our configuration of Flexus is the serengeti target. To make our lives easy, copy all of the ISO images downloaded from the previous step into this folder.
- Within the simics-3.0.22/targets/serengeti folder, there are a large number of scripts that automate the Solaris installation process. To customize our target machine configuration, first open up and edit the serengeti-6800-system.include file.
- Near the top of the file, you will notice some high-level options for your simulated target machine. Specifically, we are interested in the number of CPUs as well as the number of megs per CPU. At the minimum, Solaris 10 requires 256MB of memory. (You should check the specific requirements for your version of Solaris 10 from the link above)
- VERY IMPORTANT STEP (DO NOT SKIP!): At the top of serengeti-6800-system.include, change $cpu_class = "ultrasparc-iii-plus" to $cpu_class = "ultrasparc-iii".
- For speeding up the installation, set the number of CPUs to 1 and the amount of main memory per CPU to 512MB. These parameters can be changed at a later time after the OS installation completes and the machine is rebooted.
Once you have completed this step, open up and edit the abisko-sol10-cd-install1.simics file. You should then set the path to the first CD image by setting the line:
$cdrom_path = "sol-10-u10-ga2-sparc-dvd.iso"
Start the operating system installation in Simics by typing:
../../scripts/start-simics -x abisko-sol10-cd-install1.simicsand wait for the entire process to complete. A terminal from the target machine should appear and show you the progress of the OS installation.
- During the installation, you may be asked to answer a few questions manually (since the Simics scripts are slightly out-of-date and the questions might differ among various releases). You will get one question about NFS (just hit ESC-2 twice) and another on setting the root password (put whatever you want). You will also be asked to enable/disable remote services (select 'no'). For the rest of the settings, you can leave the default values and continue hitting ESC-2.
- The entire installation may take several hours, depending on the performance of your host PC workstation.
- When the script terminates, the first part of the installation is finished, and Solaris will have tried to reboot the system. You will need to exit Simics at this point by hitting CTRL+C at the Simics console, and typing quit.
Simics-3.0.22 expects five ISO image files for the installation, while Oracle provides only single ISO image file for newer releases. To work around this, edit the abisko-sol10-cd-install2.simics script by replacing the line:
$cdrom_path[$idx] = ("sol-10-u2-ga-sparc-v" + $idx + ".iso")with:
$cdrom_path[$idx] = ("sol-10-u10-ga2-sparc-dvd.iso")
- Now run the second script by typing ../../scripts/start-simics -x abisko-sol10-cd-install2.simics. During the second script, you may be asked for additional input, such as the preferred language, keyboard type. At some point, you will be asked to select the media type. Choose 'CD/DVD'.
- When the second script is finished, the Solaris installation will have tried to reboot the system. Like before, hit CTRL+C and type quit at the Simics console.
- Start the third script by typing ../../scripts/start-simics -x abisko-sol10-cd-install3.simics. These should only take a few minutes to complete. Afterwards, you will be presented with a login prompt. Type root and the password you specified earlier.
- The machine will shut down momentarily and at this point, a large Simics disk image called abisko-sol10-install.disk and a state file called abisko-sol10.state will have been created. After the machine shuts down, type quit at the Simics console.
- Note: We experienced slight differences between different Solaris10 releases regarding the questions that are asked during the installation. For example, for Solaris10 u9, the questions that the Simics-3.0.22 scripts expect are not asked, so we needed to customize our Simics scripts to handle such situations. You might have to do the same depending on the Solaris version you are installing.
Boot Solaris and Save Checkpoint (+)
Preparing a test workload (Not in this tutorial)
In this section, we will cover the basics necessary to prepare a simple multithreaded microbenchmark for executing within the target system. (+)
Media Streaming in Simics (Day 1)(+)
Working with Flexus (Day 2)
In this section, we will run sample Flexus simulations with the 16-CPU web serving workload. We have already prepared a valid initial ckeckpoint for you, stored as /home/tutorial3/workloads/ckpts/cloudstone/16cpu/baseline/phase_000/simics.
- Before starting working with Flexus, you need to create some initial directories under your home directory (which we will explain in the next steps):
- Please copy folder/home/tutorial3/specs/16-core-1t-baseline to your ~/specs folder
- Please copy folder/home/tutorial3/FLEXUS/flexus-4.1 to your home folder
Getting familiar with the run_job script (+)
Displaying statistics with the stat-manager tool (+)
Creating a new Flexus component and simulator (+)