logo

JBasicProfiler


Contents:
1) What is it?
2) Pre-requisites
3) Download
4) How it works?
5) Command syntax
6) Usage examples
7) Real-World results
8) Screenshots
9) Support



What is it?

It is a GPL multi-thread software for CPU, Hard Disk and Memory (RAM) profiling. It was developed to be started as a command-line software.
The functioning of this application is based on time measurement of tasks execution that simulates stress conditions of CPU, Memory and Hard Disk. Therefore, this system does not returns MHz values or system resources percentage of use. On the contrary, it returns time unit values that can be compared with another machines in order to discover the average performance of computers and detect problems with unstable/overused hardwares.

Pre-requisites:

Any kind of machine with JRE 5 (Sun Java Runtime Machine) or greater (IBM SDK for Java Version 6).

Download:

Stable version: JBasicProfiler.jar Version: 0.0.6 [2007-feb-21]

How it works?

CPU profiling: Single-thread or Multi-thread time measurement (milliseconds) of PI calculus with pre-defined number of digits after dot (3.nnnnnn).

Hard Disk profiling: Single-thread time measurement (milliseconds) of file writing and reading process with a pre-defined file size (example: 1000 i.e. ~1Gbytes).

Memory profiling: Single-thread time measurement (milliseconds) of memory writing and reading process with a pre-defined size of an ArrayList (example: 1000 i.e. ~1Gbytes).

Command syntax:

java -jar JBasicProfiler.jar <option A> <option B> <option C> <option D> <option E>

...where:

<option A> means PI number of digits to CPU profiling
<option B> means number of threads to CPU profiling
<option C> means file size to Hard Disk profiling
<option D> means memory size to Memory profiling
<option E> means debug mode: 0 == normal, 1 == CSV (only to CPU profiling)

Usage examples:

CPU test example #1 (One thread to calculate PI with 50,000 digits after dot):

java -jar JBasicProfiler.jar 50000 1 0 0 0

CPU test example #2 (Two threads to calculate PI with 25,000 digits after dot):

java -jar JBasicProfiler.jar 25000 2 0 0 0

You can use more than one thread if you have more than one processor or multi-core processors

Hard Disk test example (This test will calculate the time to write and read a file with ~500 Mbytes of size):

java -jar -Xmx512M JBasicProfiler.jar 0 0 500 0 0

Memory test example (This test will calculate the time to store and read an ArrayList with ~500 Mbytes of size):

java -jar -Xmx512M JBasicProfiler.jar 0 0 0 500 0

Note that both in Hard Disk and Memory tests we provide a heap size value through -Xmx JRE option. It is necessary because in both cases memory will be used to store and read the values before test completion.

Another important observation is that I used one example to each kind of test to avoid time differences caused by parallel processes. Then you should use JBasicProfiler to make one kind of test per time. However if you intent to do a stress test in your machine you can do all tests in same execution as you can see in next example:

java -jar -Xmx2048M JBasicProfiler.jar 100000 4 1000 1000 0

In this example the software will create 4 different threads at same time to calculate a PI with 100,000 of digits and at same time will create and read a file with ~1Gbyte and after file test it will store and read 1Gbyte of data in memory.

CSV output example (One thread to calculate PI with 50,000 digits after dot):

java -jar JBasicProfiler.jar 50000 0 0 0 1

The result of this command will be something like this:

2007-02-20 02:06:05; 363.94

Scheduled run example (automatic CPU profiling):

The best way to profile your CPU is doing several tests. Only one result is not enough. A set of at least 10 results will give to you a true vision of your processor performance. But to take this results you will need several executions of JBasicProfiler, then instead of run by yourself all tests, you can schedule the command with CSV output option enabled.

See this example using CRON on a Linux machine:

a) With 'crontab -e' command add a new line to JBasicProfiler execution:
00 * * * * /usr/lib/j2sdk1.5-sun/bin/java -jar /opt/sws/JBasicProfiler.jar 50000 1 0 0 1 >> /tmp/results.csv
b) Restart CRON service
c) Open the generated file and extract data


In this example, JBasicProfiler will run one time per hour and increment the result on a specified file on /tmp folder. Note that full path of java was given.

These are the results found on .csv file after 11 hours:
2007-02-20 02:06:05; 363.94
2007-02-20 03:06:02; 360.192
2007-02-20 04:06:02; 361.267
2007-02-20 05:06:01; 360.513
2007-02-20 06:06:03; 361.792
2007-02-20 07:06:12; 370.215
2007-02-20 08:06:11; 369.289
2007-02-20 09:06:11; 369.796
2007-02-20 10:06:12; 370.538
2007-02-20 11:06:13; 371.352
2007-02-20 12:06:11; 370.18

Real-World results:


CPU-Benchmark
The tests scenario was different x86 machines running Linux (kernel 2.6) with the same services started. Without network interferences or any kind of requests that could make influence along the analysis in all time units.

CPU ACPU BCPU CCPU DCPU ECPU F
T082.0983.187163.052187.918392.994407.051
T181.7983.728163.049213.328370.932390.169
T282.5482.946163.274184.646370.201399.728
T382.2883.091165.508199.668365.169387.298
T482.9483.275164.901182.695369.440387.270
T583.7883.017165.963217.937366.779388.386
T682.3383.147161.243192.645368.395389.259
T783.9183.917160.722207.887369.533388.196
T881.9483.348164.701192.638377.189390.871
T982.1984.206162.709209.400375.602389.730

CPU A: Represents the sum of two simultaneous threads measuring the time to calculate PI with 25,000 digits after dot. In a server with two Intel Pentium 4 processors of 3.40GHz
CPU B: Represents one thread measuring the time to calculate PI with 50,000 digits after dot. In a server with two Intel Pentium 4 processors of 3.40GHz
CPU C: Represents one thread measuring the time to calculate PI with 50,000 digits after dot. In a PC with one Intel Pentium 4 processor of 2.60GHz
CPU D: Represents one thread measuring the time to calculate PI with 50,000 digits after dot. In a server with one Intel Pentium 4 processor of 3.40GHz. Note that this machine takes more time to calculate PI than CPU C. Also it shows several different time values to the same calculus. These variations indicates a processor problem: A motherboard misconfiguration, a processor running too much time with an incorrect fan/cooler or a factory defect.
CPU E: Represents one thread measuring the time to calculate PI with 50,000 digits after dot. In a Notebook with one AMD Mobile-Sempron processor of 1.80GHz
CPU F: Represents one thread measuring the time to calculate PI with 50,000 digits after dot. In a PC with one AMD Sempron processor of 2.00GHz

CPU ACPU BCPU CCPU DCPU ECPU F
Time AVG82.57883.386163.512198.876372.623391.796
Threads211111
Processors221111
PI digits25,00050,00050,00050,00050,00050,000
GHz3.403.403.402.601.802.00
Brand Intel Pentium 4 Intel Pentium 4 Intel Pentium 4 Intel Pentium 4 AMD Mobile Sempron AMD Sempron

Screenshots:

Screenshot Linux
Screenshot Linux
Screenshot Windows

Support:

To receive support or to inform bugs send an email to Jose Damico (My Email)


SourceForge.net Logo
Valid XHTML 1.0! hacker emblem