Uploaded by Zitan Yu

CS350-Lab1.docx

advertisement
Lab #1: Unix Basics and Benchmark
Due: Thursday 2/2/2023
Total points: 20
*You need to access the fusion server to complete this assignment
Overview
In this lab, you'll be learning to operate in a Linux environment (on a remote machine). This is a
fairly common mode of programming, especially for systems programmers. For future courses
(such as CS 351, the course following this one, and systems courses like networking, databases,
and OS), you will also use linux servers and learn more about system programming.
Login into the server
In this course, we will be using fusion2.cs.iit.edu as our course server. Your account should be
set up already by the support team and an email containing your username and initial password
was sent to you. Please search your entire inbox to find your login credentials. If you still cannot
find it, contact support-fusion-group@iit.edu.
To log in to fusion2, use the ssh (secure shell) command. This lets you log in to remote systems
over an encrypted channel, making it extremely difficult to eavesdrop on (some people set up
vpn tunnels using ssh). If you're on a Mac, you already have it in your terminal (the Terminal app
or iTerm2). Similarly, if you're using a Linux OS such as Ubuntu, the terminal is already there. If
you're on a Windows machine, you can use PuTTY or Cygwin to use ssh.
The fusion server website also has a document describing how to connect to the server. Check
Doc on top of this website: https://fusion2.cs.iit.edu/
The command to login into the server is:
ssh your-user-name@fusion2.cs.iit.edu
Then you will be asked to input your initial password. After successfully logging in, you should
be landed on the Linux command prompt (“shell”). Please check
Linux-commands-handbook.pdf in the Blackboard to change your password and get familiar
with the basic shell programming.
Benchmarking Tasks
After getting around with shell commands, we will benchmark our server using unix-bench!
To get the sample code, use the following command after logging in to fusion2.
git clone https://github.com/kdlucas/byte-unixbench.git
cd byte-unixbench/UnixBench/
ls
You should be able to see the following contents in the folder:
Task 1: Read the USAGE file
To view or edit a file, you can use vim/emacs. Check Linux-commands-handbook.pdf for details.
Questions:
1. What does the command -i <count> mean? What Does -c <n> mean?
2. Which tests can give you the results on floating point computation capability? (Hint:
more than 1)
3. If you would like to benchmark the system with Whetstone metrics, what command do
you need to enter?
Task 2: Benchmark the fusion2 node.
After login to the fusion2 node and change to the source code directory, Type and enter:
./Run dhrystone -i 1
The test should start.
Note: If you type ./Run without any following parameters, it may take a while to finish the
benchmark, as a number of tests will be run. You can either wait and check the full system
benchmark report, or use ctrl+C to quit.
Please read the logs for the output and record the following metrics.
4. How many CPU cores are on the fusion2 node?
5. What is the CPU version? What is the clock frequency?
6. What is the dhrystone index for single-core and multi-core? What is the performance
speedup of multi-core, compared with single-core?
7. Does this speed up scale with the number of cores in the system?
Task 3: Benchmark the linux1 node.
After the test is done on fusion2, please login to the linux1 compute node directly from the
fusion2 shell. Type the following and your password(same as the one you use for the fusion2).
ssh linux1.cs.iit.edu
You’ll find that the code is already there. Then, repeat Task2 and answer the same set of
questions.
8. How many CPU cores are on the linux1 node?
9. What is the CPU version? What is the clock frequency?
10. What is the dhrystone index for single-core and multi-core? What is the performance
speedup of multi-core, compared with single-core?
11. Does this speed up scale with the number of cores in the system?
12. Can you explain the actual speedup v.s. number of cores scaling using amdahl's law?
What to Submit:
Please compile the following things into one single PDF document and submit to the
Blackboard.
1. Save the two screenshots for task 2 and 3, showing your user id, time of experiment and
the dhrystone index metrics. (4 point each, 8 points in total)
2. Answer the questions in task 1, 2 and 3. (1 points each, 12 points in total)
Download