Difference between revisions of "SPO600 Profiling Lab"
Chris Tyler (talk | contribs) m (moved Profiling Lab to SPO600 Profiling Lab) |
Chris Tyler (talk | contribs) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | [[Category:SPO600 Labs]]{{Admon/lab|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.}} | + | [[Category:SPO600 Labs - Retired]]{{Admon/lab|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.}} |
− | + | {{Admon/important|This lab is not a required lab in the current semester of the SPO600 course.|Please refer to the other labs in the [[:Category:SPO600 Labs|SPO600 Labs]] category.}} | |
− | == Lab | + | == Optional Lab == |
=== Prerequisites === | === Prerequisites === | ||
Line 21: | Line 21: | ||
#* Perl | #* Perl | ||
#* PHP | #* 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. | ||
# Obtain the software (via git or other version control system if necessary, or by downloading the appropriate archive/tarball). | # Obtain the software (via git or other version control system if necessary, or by downloading the appropriate archive/tarball). | ||
# Do a build with profile generation (<code>-pg</code>) enabled -- note that both the compiler and linker will require the <code>-pg</code> option. You may need to install build dependencies. | # Do a build with profile generation (<code>-pg</code>) enabled -- note that both the compiler and linker will require the <code>-pg</code> option. You may need to install build dependencies. | ||
− | # Decide what you're going to use for the profiling run. | + | # Decide what data you're going to use for the profiling run. |
− | # Execute your profiling plan and analyze the results. Record appropriate information about the data processed and the execution environment. | + | # Execute your profiling plan and analyze the results using <code>gprof</code>. Record appropriate information about the data processed and the execution environment. |
{{Admon/tip|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.}} | {{Admon/tip|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.}} | ||
Line 31: | Line 32: | ||
# Complete any of the tasks not completed by the group during the class. | # Complete any of the tasks not completed by the group during the class. | ||
− | # 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). | + | # 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. |
# 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. | # 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. |
Latest revision as of 08:33, 4 October 2018
Optional Lab
Prerequisites
- You must have working accounts on the SPO600 Servers or your own Fedora system.
- You must be able to build software.
As a Group
- Set up your pod (see note above).
- 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.
- Obtain the software (via git or other version control system if necessary, or by downloading the appropriate archive/tarball).
- 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. - Decide what data you're going to use for the profiling run.
- Execute your profiling plan and analyze the results using
gprof
. Record appropriate information about the data processed and the execution environment.
Individual Work
- Complete any of the tasks not completed by the group during the class.
- 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.
- 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.