SPO600 Profiling Lab

From CDOT Wiki
Revision as of 14:40, 11 January 2016 by Chris Tyler (talk | contribs)
Jump to: navigation, search
Lab icon.png
Purpose of this Lab
In this lab, you will do a build of a software package with profiling enabled, execute the program, and analyze the data produced by the profiling system to find potential places for optimization in the software.
This lab is not used in the current semester.
Please refer to the other labs in the SPO600 Labs category.

Lab 3


As a Group

Work in a Group of 2-6
This part of the lab should be performed in class in a group of 2-6 students. Use one of the ALC screens and set up one person as the "driver" (person using the keyboard and screen), working on your choice of Australia or Red or the Fedora system of one of the group members. The rest of the group can then discuss the project and give instructions to the driver. You should rearrange the POD tables and chairs into the most convenient arrangement for your group. You may switch drivers (and/or device being used) if agreed by the group. Take advantage of the different skills present in your group - for example, you may have someone with system administration skills, another with scripting skills, another with strong C programming skills, and yet another with good analysis skills.
  1. Set up your pod (see note above).
  2. Select one of these software packages:
    • Apache httpd
    • Nginx http server
    • Maria DB server
    • MySQL server
    • Python
    • Perl
    • PHP
    • Or another non-trivial open source software package that does not have a user interface and which processes data, either transforming it (e.g., compression, compiling, editing) or serving network requests.
  3. Obtain the software (via git or other version control system if necessary, or by downloading the appropriate archive/tarball).
  4. Do a build with profile generation (-pg) enabled -- note that both the compiler and linker will require the -pg option. You may need to install build dependencies.
  5. Decide what data you're going to use for the profiling run.
  6. Execute your profiling plan and analyze the results using gprof. Record appropriate information about the data processed and the execution environment.
Share the Wealth
Make sure that each member of the group has access to the files the group was working on before the end of class (e.g., put them in a folder with world-readable permissions, post them on a public URL, or mail them to each member of the group). It would also be a good idea to share contact information within the group.

Individual Work

  1. Complete any of the tasks not completed by the group during the class.
  2. Analyze the results to find the portions of code that offer the best opportunity for optimization (these may not be the portions that consume the most time). You will probably want to look at the source code for the relevant function.
  3. Blog the execution environment, your results, your analysis of the results, and your experience doing this lab, including things that you learned and unanswered questions that have come up.

Extra Learning

If you have interest:

  • Use another profiling tool to analyze the same software.
  • Blog about the results.