CFinder User’s Guide
Version 1.1
*Other names and brands may be claimed as the property of others.
CFinder v1.1
1
INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL®
PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY
INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS
PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL
ASSUMES NO LIABILITY WHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED
WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY
OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER
INTELLECTUAL PROPERTY RIGHT.
UNLESS OTHERWISE AGREED IN WRITING BY INTEL, THE INTEL PRODUCTS ARE NOT
DESIGNED NOR INTENDED FOR ANY APPLICATION IN WHICH THE FAILURE OF THE INTEL
PRODUCT COULD CREATE A SITUATION WHERE PERSONAL INJURY OR DEATH MAY
OCCUR.
Intel may make changes to specifications and product descriptions at any time, without notice. Designers
must not rely on the absence or characteristics of any features or instructions marked "reserved" or
"undefined." Intel reserves these for future definition and shall have no responsibility whatsoever for
conflicts or incompatibilities arising from future changes to them. The information here is subject to change
without notice. Do not finalize a design with this information.
The products described in this document may contain design defects or errors known as errata which may
cause the product to deviate from published specifications. Current characterized errata are available on
request.
Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing
your product order.
Copies of documents which have an order number and are referenced in this document, or other Intel
literature, may be obtained by calling 1-800-548-4725, or by visiting Intel's Web Site.
CFinder version 1.0
Copyright © 2007 Intel Corp.
All Rights Reserved
*Other names and brands may be claimed as the property of others.
CFinder v1.1
2
Contents
1)
2)
3)
4)
5)
Introduction
Systems Requirements
Setup
How to Use
Scaling Test
Revision History
Revision
0.9
0.95
1.0
1.1
Description
Original - Alpha
Beta
Gold
Add features
*Other names and brands may be claimed as the property of others.
CFinder v1.1
Date
12/17/2006
03/12/2007
04/02/2007
04/29/2007
3
1) Introduction
CFinder stands for concurrent finder. It is a tool that used to check if an application is
threaded and if the threads are running concurrently. This tool is aiming at providing
developers a quick way to test their applications for parallelism. It can also be used
to measure the performance by running the application before and after enhancing
and compare the elapsed times. The tool will not show how to optimize the threading
model. Tools like Intel ® Thread Checker™ or Intel ® Thread profiler™ can be used
to improve the threading model.
2) Systems Requirements
Currently the tool has been tested on 32-bit Microsoft Windows* XP systems.
3) Setup
a) Create a folder and unzip the content of the file CFinder.zip to that folder.
b) Make that folder the current directory.
c) Follow instructions in section 4.
Note: Make sure to close all other applications to improve the accuracy of the
results.
4) How to Use
There are two ways to run this tool; you can use it in the graphic user interface
(GUI) mode or you can run it in the command-line/un-attending (script) mode.
You can use this tool to measure the performance by running the application
before and after optimization and compare the elapsed times.
4.1) GUI Mode:
In this mode, you can either double click the file name “CFinder.exe”
from Microsoft Windows* Explorer or just type that name at the
command prompt. Note that if you type the name “CFinder.exe” at the
command prompt; make sure that you don’t type anything else after that
name. Otherwise, the program will think that you want to run it in the
command-line mode.
Below is the main screen of the tool.
*Other names and brands may be claimed as the property of others.
CFinder v1.1
4
Figure 1
In order to run you need to do the following steps:
a) Click the down arrow to select the sampling rate in milliseconds.
This is the time between samples. For example, 100 means the
tool will take one sample and then wait for 100 milliseconds
before taking the next sample.
b) Now click the down arrow to select the duration in seconds. This
is to tell the tool to collect data only within this time period. For
example, if you select 20 that means you instruct the tool to
collect data for 20 seconds.
Suppose you want to measure an application until it finishes. You
need to select the maximum duration. In this version, the
maximum duration is 3600 seconds which is equivalent to one
hour. After that run that application and close it when it is done.
The tool will automatically calculate the elapsed time and other
values as soon as the application is closed.
*Other names and brands may be claimed as the property of others.
5
CFinder v1.1
c) Next click the button
to measure.
to select the application
d) After that type parameters for that application if there is one.
Otherwise, leave it blank.
e) By default, the log file will be turned off. Select “Yes” to
generate the log file. Two log files will be generated: one log
file called CFyyyymmddhhmm.txt is a complete one and the
other called CFSyyyymmddhhmm.txt only contains some
important information like the elapsed and parallel time.
CF: Stands for Concurrent Finder
CFS: Stands for Concurrent Finder summary
YYYY: Year in four digits
MM: Month
DD: Day
HH: Hour
MM: Minute
f) Click the button
to run the tool. Note that the main
screen will disappear during the run to make sure that windows
won’t waste time updating the screen. The customer application
will be running twice. On the first run, the tool will determine
how many threads generated by the customer application. The
tool will actually capture the data on the second run. After the
tool finishes collecting data, the main screen will appear again.
This is a normal behavior.
Note:
a) Make sure the target application is not running prior to
running this tool. This action to ensure that only one
instance of the application is running at any time.
b) Make sure to close the application (not the tool) if it still
appears even after the tool is showing the results. This
*Other names and brands may be claimed as the property of others.
CFinder v1.1
6
action is necessary to ensure only one instance of the
customer application is running at the time of measuring.
c) Activities happening in the two runs must be identical to
ensure the maximum numbers of threads in the two runs are
the same.
d) If there are more than one instance of the application is
running, the results will be incorrect.
g) Using CAPTURE buttons:
a) Click the
and select ‘Yes’ at
b) Click the button
to start capturing data.
c) Click the button
to stop capturing data.
h) Finally, to exit out of the tool, click the
button.
3.2) Command-line Mode:
To run the tool in the command line mode, flag(s) and parameter(s) must
follow the tool name.
Usage:
CFinder [-h] [-n sampling] [-f logname] [-app appname ...]
-h Command line usage.
-n sampling Sampling interval in milliseconds. The default value is 100.
Valid entries are 100, or 1000.
-l logfile Generate a log file with name logfile. Default log name is
CFinder.txt.
-app appname Run the application with its optional parameters.
Example 1: CFinder -app MyApp.exe param1 param2
Example 2: CFinder -n 100 -l MyLog.txt -app MyApp.exe param1 param2
100: Duration in msec and MyLog.txt: Log file
Note: The command-line mode can only run on fix duration of 30 seconds
and can only provide some information about the processor. It provides
no information about parallelism or thread
*Other names and brands may be claimed as the property of others.
7
CFinder v1.1
5) Scaling Test
To test if the application is scaling with multi-core or multi-processor, make sure
to run the tool with different numbers of processors starting with one processor.
In order to do that you need to add a switch in the file boot.ini. For example, the
content of the boot.ini is as follow:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft
Windows XP Professional" /fastdetect /NoExecute=OptIn
Add the switch /numproc=x at the end of the last line:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft
Windows XP Professional" /fastdetect /NoExecute=OptIn
/numproc=1
In this case windows is set to run only on one processor. Make sure to vary the
number of processors from 1 to the maximum number of available processors.
Remember to reboot the system every time the file boot.ini is modified.
*Other names and brands may be claimed as the property of others.
CFinder v1.1
8