summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2016-03-28 23:24:06 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2016-03-28 23:35:14 +0800
commitd5e54e3412872af72e2f9c0d41ea14e58b849b6e (patch)
treeeb5a0ada1bee350353b2566e2751f9b09fd695fc
parent2d1e18d14a9eb092f5df6f75d20e75ffe704ca5f (diff)
downloadiozone-d5e54e3412872af72e2f9c0d41ea14e58b849b6e.tar.gz
update to version Revision 3.434
Change-Id: I33e42261642be43bc1fab3412b9cb467b9794162 Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rw-r--r--src/current/Changes.txt115
-rw-r--r--src/current/fileop.c4
-rw-r--r--src/current/iozone.c872
-rwxr-xr-xsrc/current/iozone_visualizer.pl285
-rw-r--r--src/current/libasync.c6
-rw-r--r--src/current/libbif.c6
-rw-r--r--src/current/makefile66
-rwxr-xr-xsrc/current/report.pl4
-rw-r--r--src/current/spec.in28
9 files changed, 989 insertions, 397 deletions
diff --git a/src/current/Changes.txt b/src/current/Changes.txt
index a619f8b..13baa0e 100644
--- a/src/current/Changes.txt
+++ b/src/current/Changes.txt
@@ -2407,3 +2407,118 @@ Bug fix for getopt default case, with bad parameter handed in.
Revision 3.398
Adding thread_read_test and thread_write_test.
=============================================================================
+Revision 3.401
+bug fix for re-write rec.
+=============================================================================
+Revision 3.402
+Mods for DragonFly support.
+=============================================================================
+Revision 3.403
+Add -+W to permit chid_skew. This permits adding files, and continuing
+the proper sharing/dedup within each quadrant, within same seed group
+and with previously existing files that were created with a different
+number of threads.
+=============================================================================
+Revision 3.404
+Fix type-oh in usage message.
+=============================================================================
+Revision 3.405
+Reduce CPU consumption in the op_rate control mechanism.
+=============================================================================
+Revision 3.406
+Increase buffer size for configuration lines. They might be 700 chars long.
+=============================================================================
+Revision 3.407
+Work around for cache_line_size suddenly becoming zero and breaking fetchit()
+=============================================================================
+Revision 3.408
+Bug fix for clobbering of buffer. "tfile" needed to be bigger, as its
+address was loaded into filearray[] and then that was overwritten
+by the mfflag causing parsed names to get loaded.
+=============================================================================
+Revision 3.409
+=============================================================================
+Bug fix for using -m in combination with -+d
+=============================================================================
+Revision 3.410
+=============================================================================
+Bug fix: Improve consistency of use_thread in thread_fread and thread_fwrite.
+=============================================================================
+Revision 3.411
+=============================================================================
+Compat fix: Move from using macosx to IOZ_macosx, because APPLE started
+using macosx in Mountain Lion.
+=============================================================================
+Revision 3.412
+=============================================================================
+Adding -+F flag for trunc before thread_write. Needed by Vangel for
+thread_mix_test.
+=============================================================================
+Revision 3.413
+=============================================================================
+Bug fix for -+F flag.
+=============================================================================
+Revision 3.414
+=============================================================================
+Add Vangel to the contributors list
+=============================================================================
+Revision 3.415
+=============================================================================
+Minor bug fix for -J option (think time) in the thread_pread_test()
+=============================================================================
+Revision 3.417
+=============================================================================
+Add -+J option. Include think time (-j #) in throughput calculation
+=============================================================================
+Revision 3.419
+=============================================================================
+Add better handling of exit values.
+=============================================================================
+Revision 3.420
+=============================================================================
+Add new contributor to list.
+=============================================================================
+Revision 3.421
+=============================================================================
+Bug fix from Alp Aker:
+Patch for a minor issue in IOzone's signal_handler() function:
+the no_unlink option is respected only for the first member of the dummyfile[]
+array; the rest of the dummy files are unconditionally deleted, whether or not
+the '+w' flag has been passed to the program.
+=============================================================================
+Revision 3.422
+=============================================================================
+Code cleanup. No functional changes.
+=============================================================================
+Revision 3.423
+=============================================================================
+Improve consistency of Kbytes instead of kbytes, KBytes, kBytes...
+=============================================================================
+Revision 3.424
+=============================================================================
+Fix for 64 bit and touch_dedup.
+=============================================================================
+Revision 3.425
+=============================================================================
+Fix for 64 bit and gen_new_buf
+=============================================================================
+Revision 3.427
+Adjust formatting so fields don't run together.
+=============================================================================
+Revision 3.428
+Adjust formatting so fields don't run together.
+=============================================================================
+Revision 3.429
+Add two more characters to array my_port_num.
+=============================================================================
+=============================================================================
+Revision 3.430
+Adding -+b option for bursty operations.
+Donated by: Avi Shchislowski <Avi.Shchislowski@sandisk.com>
+=============================================================================
+Revision 3.432
+Adding NetBSD 64 bit.
+=============================================================================
+Revision 3.434
+Adding code from Alexey Skidanov. Pthread burst I/O.
+=============================================================================
diff --git a/src/current/fileop.c b/src/current/fileop.c
index c98bd80..28e39b2 100644
--- a/src/current/fileop.c
+++ b/src/current/fileop.c
@@ -128,7 +128,7 @@ void bzero();
void clear_stats();
int validate(char *, int , char );
-#define THISVERSION " $Revision: 1.60 $"
+#define THISVERSION " $Revision: 1.61 $"
/*#define NULL 0*/
char version[]=THISVERSION;
@@ -1374,11 +1374,9 @@ validate(char *buffer, int size, char value)
{
register int i;
register char *cp;
- register int size1;
register char v1;
v1=value;
cp = buffer;
- size1=size;
for(i=0;i<size;i++)
{
if(*cp++ != v1)
diff --git a/src/current/iozone.c b/src/current/iozone.c
index 38f9da8..65c51a3 100644
--- a/src/current/iozone.c
+++ b/src/current/iozone.c
@@ -60,7 +60,7 @@
/* The version number */
-#define THISVERSION " Version $Revision: 3.398 $"
+#define THISVERSION " Version $Revision: 3.434 $"
#if defined(linux)
#define _GNU_SOURCE
@@ -70,7 +70,7 @@
#include <windows.h>
#include <errno.h>
#else
-#if defined(linux) || defined(solaris) || defined(macosx) || defined(__AIX__) || defined(FreeBSD) || defined(_HPUX_SOURCE)
+#if defined(linux) || defined(solaris) || defined(IOZ_macosx) || defined(__AIX__) || defined(FreeBSD) || defined(_HPUX_SOURCE) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__NetBSD__)
#include <errno.h>
#else
extern int errno; /* imported for errors */
@@ -127,15 +127,15 @@ unsigned long long genrand64_int64(void);
#include <fcntl.h>
char *help[] = {
-" Usage: iozone [-s filesize_Kb] [-r record_size_Kb] [-f [path]filename] [-h]",
+" Usage: iozone [-s filesize_kB] [-r record_size_kB] [-f [path]filename] [-h]",
" [-i test] [-E] [-p] [-a] [-A] [-z] [-Z] [-m] [-M] [-t children]",
" [-l min_number_procs] [-u max_number_procs] [-v] [-R] [-x] [-o]",
" [-d microseconds] [-F path1 path2...] [-V pattern] [-j stride]",
" [-T] [-C] [-B] [-D] [-G] [-I] [-H depth] [-k depth] [-U mount_point]",
-" [-S cache_size] [-O] [-L cacheline_size] [-K] [-g maxfilesize_Kb]",
-" [-n minfilesize_Kb] [-N] [-Q] [-P start_cpu] [-e] [-c] [-b Excel.xls]",
+" [-S cache_size] [-O] [-L cacheline_size] [-K] [-g maxfilesize_kB]",
+" [-n minfilesize_kB] [-N] [-Q] [-P start_cpu] [-e] [-c] [-b Excel.xls]",
" [-J milliseconds] [-X write_telemetry_filename] [-w] [-W]",
-" [-Y read_telemetry_filename] [-y minrecsize_Kb] [-q maxrecsize_Kb]",
+" [-Y read_telemetry_filename] [-y minrecsize_kB] [-q maxrecsize_kB]",
" [-+u] [-+m cluster_filename] [-+d] [-+x multiplier] [-+p # ]",
" [-+r] [-+t] [-+X] [-+Z] [-+w percent dedupable] [-+y percent_interior_dedup]",
" [-+C percent_dedup_within]",
@@ -152,7 +152,7 @@ char *help[] = {
" -E Run extension tests",
" -f filename to use",
" -F filenames for each process/thread in throughput test",
-" -g # Set maximum file size (in Kbytes) for auto mode (or #m or #g)",
+" -g # Set maximum file size (in kBytes) for auto mode (or #m or #g)",
" -G Use msync(MS_SYNC) on mmap files",
" -h help",
" -H # Use POSIX async I/O with # async operations",
@@ -169,24 +169,24 @@ char *help[] = {
" -L # Set processor cache line size to value (in bytes)",
" -m Use multiple buffers",
" -M Report uname -a output",
-" -n # Set minimum file size (in Kbytes) for auto mode (or #m or #g)",
+" -n # Set minimum file size (in kBytes) for auto mode (or #m or #g)",
" -N Report results in microseconds per operation",
" -o Writes are synch (O_SYNC)",
" -O Give results in ops/sec.",
" -p Purge on",
" -P # Bind processes/threads to processors, starting with this cpu",
-" -q # Set maximum record size (in Kbytes) for auto mode (or #m or #g)",
+" -q # Set maximum record size (in kBytes) for auto mode (or #m or #g)",
" -Q Create offset/latency files",
" -r # record size in Kb",
-" or -r #k .. size in Kb",
-" or -r #m .. size in Mb",
-" or -r #g .. size in Gb",
+" or -r #k .. size in kB",
+" or -r #m .. size in MB",
+" or -r #g .. size in GB",
" -R Generate Excel report",
" -s # file size in Kb",
-" or -s #k .. size in Kb",
-" or -s #m .. size in Mb",
-" or -s #g .. size in Gb",
-" -S # Set processor cache size to value (in Kbytes)",
+" or -s #k .. size in kB",
+" or -s #m .. size in MB",
+" or -s #g .. size in GB",
+" -S # Set processor cache size to value (in kBytes)",
" -t # Number of threads or processes to use in throughput test",
" -T Use POSIX pthreads for throughput tests",
" -u # Upper limit on number of processes to run",
@@ -197,11 +197,14 @@ char *help[] = {
" -W Lock file when reading or writing",
" -x Turn off stone-walling",
" -X filename Write telemetry file. Contains lines with (offset reclen compute_time) in ascii",
-" -y # Set minimum record size (in Kbytes) for auto mode (or #m or #g)",
+" -y # Set minimum record size (in kBytes) for auto mode (or #m or #g)",
" -Y filename Read telemetry file. Contains lines with (offset reclen compute_time) in ascii",
" -z Used in conjunction with -a to test all possible record sizes",
" -Z Enable mixing of mmap I/O and file I/O",
+" -+b #,# burst size (KB),sleep between burst (mili-second)",
" -+E Use existing non-Iozone file for read-only testing",
+" -+F Truncate file before write in thread_mix_test",
+" -+J Include think time (-j #) in throughput calculation",
" -+K Sony special. Manual control of test 8.",
" -+m Cluster_filename Enable Cluster testing",
" -+d File I/O diagnostic mode. (To troubleshoot a broken file I/O subsystem)",
@@ -225,7 +228,10 @@ char *help[] = {
#endif
" -+N Do not truncate existing files on sequential writes.",
" -+S # Dedup-able data is limited to sharing within each numerically",
-" identified file set",
+" identified file set.",
+" -+W # Add this value to the child thread ID, so that additional files",
+" can be added while maintaining the proper dedupability with previously",
+" existing files that are within the same seed group (-+S).",
" -+V Enable shared file. No locking.",
#if defined(Windows)
" -+U Windows Unbufferd I/O API (Very Experimental)",
@@ -285,7 +291,7 @@ THISVERSION,
#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__APPLE__) && !defined(__DragonFly__)
#include <malloc.h>
#endif
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__DragonFly__) || defined(__NetBSD__)
#include <stdlib.h>
#include <string.h>
#endif
@@ -296,7 +302,7 @@ THISVERSION,
#endif
#endif
-#if defined (__FreeBSD__)
+#if defined (__FreeBSD__) || defined(__DSragonFly__)
#ifndef O_RSYNC
#define O_RSYNC O_FSYNC
#endif
@@ -518,10 +524,12 @@ struct client_command {
int c_dedup_interior;
int c_dedup_compress;
int c_dedup_mseed;
+ int c_chid_skew;
int c_hist_summary;
int c_op_rate;
int c_op_rate_flag;
int c_Q_flag;
+ int c_inc_think;
int c_L_flag;
int c_OPS_flag;
int c_mmapflag;
@@ -543,6 +551,7 @@ struct client_command {
int c_direct_flag;
int c_cpuutilflag;
int c_seq_mix;
+ int c_del_flag;
int c_client_number;
int c_command;
int c_testnum;
@@ -618,10 +627,12 @@ struct client_neutral_command {
char c_dedup_interior[4];
char c_dedup_compress[4];
char c_dedup_mseed[4];
+ char c_chid_skew[4];
char c_hist_summary[4];
char c_op_rate[4];
char c_op_rate_flag[2];
char c_Q_flag[2];
+ char c_inc_think[2];
char c_L_flag[2];
char c_OPS_flag[2];
char c_mmapflag[2];
@@ -643,6 +654,7 @@ struct client_neutral_command {
char c_direct_flag[2]; /* small int */
char c_cpuutilflag[2]; /* small int */
char c_seq_mix[2]; /* small int */
+ char c_del_flag[2]; /* small int */
char c_stride[10]; /* small long long */
char c_rest_val[10]; /* small long long */
char c_purge[10]; /* very small long long */
@@ -840,21 +852,18 @@ struct master_neutral_command {
#ifdef HAVE_PREAD
#include <sys/times.h>
#if defined(HAVE_PREAD) && defined(HAVE_PREADV)
-#define CONTROL_STRING1 "%16ld%8ld%8ld%8ld%8ld%8ld%8ld%8ld%8ld %8ld %8ld%8ld%8ld%9ld%9ld%8ld%10ld%9ld%10ld%9ld%10ld%10ld%9ld\n"
-#define CONTROL_STRING2 "%16s%8s%8s%8s%8s%10s%8s%8s%8s %8s %8s%9s%9s%8s%9s%8s%9s%7s%10s%10s%10s%9s%9s\n"
-#define CONTROL_STRING3 "%16s%8s%8s%8s%8s%10s%8s%8s%8s %8s %8s%9s%9s%8s%9s\n"
-#define CONTROL_STRING4 "%16s%8s%8s%8s%8s%10s\n"
+#define CONTROL_STRING2 "%16s%8s%9s%9s%8s%10s%8s %9s%9s %9s %9s%9s%9s%9s%9s%8s%9s%8s%10s%10s%10s%9s%9s\n"
+#define CONTROL_STRING3 "%16s%8s%9s%9s%8s%10s%8s %9s%9s %9s %9s%9s%9s%9s%9s\n"
+#define CONTROL_STRING4 "%16s%8s%9s%9s%8s%10s\n"
#else
-#define CONTROL_STRING1 "%16ld%8ld%8ld%8ld%8ld%8ld%8ld%8ld%8ld %8ld %8ld%8ld%8ld%9ld%9ld%8ld%10ld%9ld%10ld\n"
-#define CONTROL_STRING2 "%16s%8s%8s%8s%8s%10s%8s%8s%8s %8s %8s%9s%9s%8s%9s%8s%9s%7s%10s\n"
-#define CONTROL_STRING3 "%16s%8s%8s%8s%8s%10s%8s%8s%8s %8s %8s\n"
-#define CONTROL_STRING4 "%16s%8s%8s%8s%8s%10s\n"
+#define CONTROL_STRING2 "%16s%8s%9s%9s%8s%10s%8s %9s%9s %9s %9s%9s%9s%9s%9s%8s%9s%8s%10s\n"
+#define CONTROL_STRING3 "%16s%8s%9s%9s%8s%10s%8s %9s%9s %9s %9s\n"
+#define CONTROL_STRING4 "%16s%8s%9s%9s%8s%10s\n"
#endif
#else
-#define CONTROL_STRING1 "%16ld%8ld%8ld%8ld%8ld%8ld%8ld%8ld%8ld %8ld %8ld%8ld%8ld%9ld%9ld\n"
-#define CONTROL_STRING2 "%16s%8s%8s%8s%8s%10s%8s%8s%8s %8s %8s%9s%9s%8s%9s\n"
-#define CONTROL_STRING3 "%16s%8s%8s%8s%8s%10s%8s%8s%8s %8s %8s%9s%9s%8s%9s\n"
-#define CONTROL_STRING4 "%16s%8s%8s%8s%8s%10s\n"
+#define CONTROL_STRING2 "%16s%8s%9s%9s%8s%10s%8s %9s%9s %9s %9s%9s%9s%9s%9s\n"
+#define CONTROL_STRING3 "%16s%8s%9s%9s%8s%10s%8s %9s%9s %9s %9s%9s%9s%9s%9s\n"
+#define CONTROL_STRING4 "%16s%8s%9s%9s%8s%10s\n"
#endif
#endif
@@ -862,21 +871,18 @@ struct master_neutral_command {
#ifdef HAVE_PREAD
#include <sys/times.h>
#if defined(HAVE_PREAD) && defined(HAVE_PREADV)
-#define CONTROL_STRING1 "%16lld%8ld%8ld%8ld%8ld%8ld%8ld%8ld%8ld %8ld %8ld%8ld%8ld%9ld%9ld%8ld%10ld%9ld%10ld%9ld%10ld%10ld%9ld\n"
-#define CONTROL_STRING2 "%16s%8s%8s%8s%8s%10s%8s%8s%8s %8s %8s%9s%9s%8s%9s%8s%9s%7s%10s%10s%10s%9s%9s\n"
-#define CONTROL_STRING3 "%16s%8s%8s%8s%8s%10s%8s%8s%8s %8s %8s%9s%9s%8s%9s\n"
-#define CONTROL_STRING4 "%16s%8s%8s%8s%8s%10s\n"
+#define CONTROL_STRING2 "%16s%8s%9s%9s%8s%10s%8s %9s%9s %9s %9s%9s%9s%9s%9s%8s%9s%8s%10s%10s%10s%9s%9s\n"
+#define CONTROL_STRING3 "%16s%8s%9s%9s%8s%10s%8s %9s%9s %9s %9s%9s%9s%9s%9s\n"
+#define CONTROL_STRING4 "%16s%8s%9s%9s%8s%10s\n"
#else
-#define CONTROL_STRING1 "%16lld%8ld%8ld%8ld%8ld%8ld%8ld%8ld%8ld %8ld %8ld%8ld%8ld%9ld%9ld%8ld%10ld%9ld%10ld\n"
-#define CONTROL_STRING2 "%16s%8s%8s%8s%8s%10s%8s%8s%8s %8s %8s%9s%9s%8s%9s%8s%9s%7s%10s\n"
-#define CONTROL_STRING3 "%16s%8s%8s%8s%8s%10s%8s%8s%8s %8s %8s%9s%9s%8s%9s\n"
-#define CONTROL_STRING4 "%16s%8s%8s%8s%8s%10s\n"
+#define CONTROL_STRING2 "%16s%8s%9s%9s%8s%10s%8s %9s%9s %9s %9s%9s%9s%9s%9s%8s%9s%8s%10s\n"
+#define CONTROL_STRING3 "%16s%8s%9s%9s%8s%10s%8s %9s%9s %9s %9s%9s%9s%9s%9s\n"
+#define CONTROL_STRING4 "%16s%8s%9s%9s%8s%10s\n"
#endif
#else
-#define CONTROL_STRING1 "%16lld%8ld%8ld%8ld%8ld%8ld%8ld%8ld %8ld %8ld%8ld%8ld%8ld%9ld%9ld\n"
-#define CONTROL_STRING2 "%16s%8s%8s%8s%8s%10s%8s%8s%8s %8s %8s%9s%9s%8s%9s\n"
-#define CONTROL_STRING3 "%16s%8s%8s%8s%8s%10s%8s%8s%8s %8s %8s%9s%9s%8s%9s\n"
-#define CONTROL_STRING4 "%16s%8s%8s%8s%8s%10s\n"
+#define CONTROL_STRING2 "%16s%8s%9s%9s%8s%10s%8s %9s%9s %9s %9s%9s%9s%8s%9s\n"
+#define CONTROL_STRING3 "%16s%8s%9s%9s%8s%10s%8s %9s%9s %9s %9s%9s%9s%9s%9s\n"
+#define CONTROL_STRING4 "%16s%8s%9s%9s%8s%10s\n"
#endif
#endif
@@ -887,7 +893,7 @@ struct master_neutral_command {
/* Start with 64 kbyte minimum file size by default */
#define KILOBYTES_START 64
-/* Default maximum file size. This is 512 Mbytes */
+/* Default maximum file size. This is 512 MBytes */
#define KILOBYTES_END (1024*512)
/* Default starting record size */
#define RECLEN_START 4096
@@ -972,6 +978,10 @@ static double cputime_so_far();
#else
#define cputime_so_far() time_so_far()
#endif
+static void update_burst_sleep(int, long long, double *);
+#ifndef NO_THREADS
+static void count_burst(double* burst_acc_time_sec, long long stream_id);
+#endif
static double time_so_far1(); /* time since start of program */
void get_resolution();
void get_rusage_resolution();
@@ -1231,22 +1241,28 @@ char *test_output[] = {" ",
" ",
" \n" };
*/
-char *test_output[] = {" ",
- " ",
- " ",
- " ",
- " ",
- " ",
+
+#ifdef FOOBAR
+ random random bkwd record stride
+ write rewrite read reread read write read rewrite read fwrite frewrite fread freread pwv prwv prv prrv
+#endif
+char *test_output[] ={" ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
" ",
- " ",
- "",
" ",
- " ",
- " ",
- " ",
- " ",
- " ",
- " \n" };
+ "",
+ " ",
+ " ",
+ " ",
+ " ",
+
+ " ",
+ " ",
+ " \n" };
long long test_soutput[] = {2,2,2,1,1,1,2,2,2,2,2,2,2,2};
@@ -1288,6 +1304,7 @@ char *barray[MAXSTREAMS];
char *haveshm;
extern int optind;
long long onetime, auto_mode, sfd, multi_buffer;
+int exit_code = 0;
int fd;
int sp_msfd,sp_mrfd,sp_csfd,sp_crfd;
int begin_proc,num_processors,ioz_processor_bind;
@@ -1297,10 +1314,11 @@ char master_iozone, client_iozone,distributed;
int bif_fd,s_count;
int bif_row,bif_column;
int dedup_mseed = 1;
+int chid_skew = 0;
int hist_summary;
int op_rate;
int op_rate_flag;
-char aflag, Eflag, hflag, Rflag, rflag, sflag;
+char aflag, Eflag, hflag, Rflag, rflag, sflag,del_flag,mix_test;
char diag_v,sent_stop,dedup,dedup_interior,dedup_compress;
char *dedup_ibuf;
char *dedup_temp;
@@ -1356,13 +1374,23 @@ struct size_entry *rec_size_list=0;
off64_t maximum_file_size;
off64_t minimum_file_size;
+off64_t burst_size_kb_64 = -1; /* the size of the burst (in KBytes) */
+long long burst_sleep_duration_msec = -1; /* the sleep duration between burst */
+long long written_this_burst = 0; /* How much data was writen so far in this burst*/
+#ifndef NO_THREADS
+pthread_barrierattr_t barrier_attr;
+pthread_barrier_t *barrier;
+off64_t burst_size_per_child = 0;
+long long burst_written_so_far[MAXSTREAMS] = {0}; /* How much data was written so far in this burst per stream (thread/process)*/
+#endif
+
char bif_filename [MAXNAMESIZE]; /* name of biff file */
char filename [MAXNAMESIZE]; /* name of temporary file */
char mountname [MAXNAMESIZE]; /* name of device */
char dummyfile [MAXSTREAMS][MAXNAMESIZE]; /* name of dummy file */
char dummyfile1 [MAXNAMESIZE]; /* name of dummy file */
char *filearray[MAXSTREAMS]; /* array of file names */
-char tfile[] = "iozone";
+char tfile[MAXNAMESIZE];
char *buffer,*buffer1, *mbuffer,*mainbuffer;
FILE *pi,*r_traj_fd,*w_traj_fd;
VOLATILE char *pbuffer;
@@ -1514,7 +1542,7 @@ char verify = 1;
int restf;
char sverify = 1;
char odsync = 0;
-char Q_flag,OPS_flag;
+char inc_think, Q_flag,OPS_flag;
char L_flag=0;
char no_copy_flag,include_close,include_flush;
char disrupt_flag,compute_flag,xflag,Z_flag, X_flag;
@@ -1624,6 +1652,7 @@ char **argv;
char *evalue;
+ strcpy(tfile,"iozone"); /* Dummy name prefix */
anwser=bind_cpu=0;
/* Used to make fread/fwrite do something better than their defaults */
setvbuf( stdout, NULL, _IONBF, (size_t) NULL );
@@ -1646,7 +1675,7 @@ char **argv;
mygen=rand(); /* Pick a random generation number */
/* Try to find the actual VM page size, if possible */
-#if defined (solaris) || defined (_HPUX_SOURCE) || defined (linux) || defined(IRIX) || defined (IRIX64)
+#if defined (solaris) || defined (_HPUX_SOURCE) || defined (linux) || defined(IRIX) || defined (IRIX64) || defined(__NetBSD__)
#ifndef __convex_spp
page_size=getpagesize();
#endif
@@ -1677,8 +1706,9 @@ char **argv;
sprintf(splash[splash_line++],"\t Randy Dunlap, Mark Montague, Dan Million, Gavin Brebner,\n");
sprintf(splash[splash_line++],"\t Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave Boone,\n");
sprintf(splash[splash_line++],"\t Erik Habbinga, Kris Strecker, Walter Wong, Joshua Root,\n");
- sprintf(splash[splash_line++],"\t Fabrice Bacchella, Zhenghua Xue, Qin Li, Darren Sawyer.\n");
- sprintf(splash[splash_line++],"\t Ben England.\n\n");
+ sprintf(splash[splash_line++],"\t Fabrice Bacchella, Zhenghua Xue, Qin Li, Darren Sawyer,\n");
+ sprintf(splash[splash_line++],"\t Vangel Bojaxhi, Ben England, Vikentsi Lapa,\n");
+ sprintf(splash[splash_line++],"\t Alexey Skidanov.\n\n");
sprintf(splash[splash_line++],"\tRun began: %s\n",ctime(&time_run));
argcsave=argc;
argvsave=argv;
@@ -1769,7 +1799,7 @@ char **argv;
#ifdef NO_PRINT_LLD
sprintf(splash[splash_line++],"\tPOSIX Async I/O (no bcopy). Depth %ld \n",depth);
#else
- sprintf(splash[splash_line++],"\tPOSIX Async I/O (no bcopy). Depth %lld \n",depth);
+ sprintf(splash[splash_line++],"\tPOSIX Async I/O (no bcopy). Depth %lld \n",(long long)depth);
#endif
no_copy_flag=1;
async_flag++;
@@ -1799,7 +1829,7 @@ char **argv;
#ifdef NO_PRINT_LLD
sprintf(splash[splash_line++],"\tPOSIX async I/O (with bcopy). Depth %ld\n",depth);
#else
- sprintf(splash[splash_line++],"\tPOSIX async I/O (with bcopy). Depth %lld\n",depth);
+ sprintf(splash[splash_line++],"\tPOSIX async I/O (with bcopy). Depth %lld\n",(long long)depth);
#endif
async_flag++;
break;
@@ -1910,9 +1940,9 @@ char **argv;
min_file_size = (off64_t)s_range[0]; /* Make visable globally */
#ifdef NO_PRINT_LLD
- sprintf(splash[splash_line++],"\tFile size set to %ld KB\n",kilobytes64);
+ sprintf(splash[splash_line++],"\tFile size set to %ld kB\n",kilobytes64);
#else
- sprintf(splash[splash_line++],"\tFile size set to %lld KB\n",kilobytes64);
+ sprintf(splash[splash_line++],"\tFile size set to %lld kB\n",kilobytes64);
#endif
sflag++;
break;
@@ -2032,7 +2062,7 @@ char **argv;
sprintf(splash[splash_line++],"\tSYNC Mode. \n");
oflag++;
break;
- case 'O': /* Report in Ops/sec instead of KB/sec */
+ case 'O': /* Report in Ops/sec instead of kB/sec */
sprintf(splash[splash_line++],"\tOPS Mode. Output is in operations per second.\n");
OPS_flag++;
break;
@@ -2120,16 +2150,16 @@ char **argv;
max_rec_size = (off64_t)r_range[r_count-1]; /* Make visable globally */
min_rec_size = (off64_t)r_range[0]; /* Make visable globally */
#ifdef NO_PRINT_LLD
- sprintf(splash[splash_line++],"\tRecord Size %ld KB\n",reclen/1024);
+ sprintf(splash[splash_line++],"\tRecord Size %ld kB\n",reclen/1024);
#else
- sprintf(splash[splash_line++],"\tRecord Size %lld KB\n",reclen/1024);
+ sprintf(splash[splash_line++],"\tRecord Size %lld kB\n",reclen/1024);
#endif
if(max_rec_size > MAXBUFFERSIZE) {
#ifdef NO_PRINT_LLD
- printf("Error: maximum record size %ld KB is greater than maximum buffer size %ld KB\n ",
+ printf("Error: maximum record size %ld kB is greater than maximum buffer size %ld kB\n ",
max_rec_size/1024, MAXBUFFERSIZE/1024);
#else
- printf("Error: maximum record size %lld KB is greater than maximum buffer size %lld KB\n ",
+ printf("Error: maximum record size %lld kB is greater than maximum buffer size %lld kB\n ",
(long long)(max_rec_size/1024LL), (long long)MAXBUFFERSIZE/1024LL);
#endif
exit(23);
@@ -2174,6 +2204,14 @@ char **argv;
printf("Can not run throughput tests with unmount & remounts.\n");
exit(15);
}
+
+#ifdef NO_THREADS
+ if(burst_size_kb_64 != -1 && burst_sleep_duration_msec != -1)
+ {
+ printf("Can not run throughput tests with burst option.\n");
+ exit(100);
+ }
+#endif
break;
case 'd': /* Specify the delay of children to run */
delay_start = (long long)(atoi(optarg));
@@ -2326,9 +2364,9 @@ char **argv;
if(min_rec_size <= 0)
min_rec_size=(long long)RECLEN_START;
#ifdef NO_PRINT_LLD
- sprintf(splash[splash_line++],"\tUsing Minimum Record Size %ld KB\n", min_rec_size/1024);
+ sprintf(splash[splash_line++],"\tUsing Minimum Record Size %ld kB\n", min_rec_size/1024);
#else
- sprintf(splash[splash_line++],"\tUsing Minimum Record Size %lld KB\n", min_rec_size/1024);
+ sprintf(splash[splash_line++],"\tUsing Minimum Record Size %lld kB\n", min_rec_size/1024);
#endif
break;
case 'q': /* Set max record size for auto mode */
@@ -2350,18 +2388,18 @@ char **argv;
min_rec_size=(long long)RECLEN_END;
if(max_rec_size > MAXBUFFERSIZE) {
#ifdef NO_PRINT_LLD
- printf("Error: maximum record size %ld KB is greater than maximum buffer size %ld KB\n ",
+ printf("Error: maximum record size %ld kB is greater than maximum buffer size %ld kB\n ",
max_rec_size/1024, MAXBUFFERSIZE/1024);
#else
- printf("Error: maximum record size %lld KB is greater than maximum buffer size %lld KB\n ",
+ printf("Error: maximum record size %lld kB is greater than maximum buffer size %lld kB\n ",
(long long)(max_rec_size/1024LL), (long long)MAXBUFFERSIZE/1024LL);
#endif
exit(23);
}
#ifdef NO_PRINT_LLD
- sprintf(splash[splash_line++],"\tUsing Maximum Record Size %ld KB\n", max_rec_size/1024);
+ sprintf(splash[splash_line++],"\tUsing Maximum Record Size %ld kB\n", max_rec_size/1024);
#else
- sprintf(splash[splash_line++],"\tUsing Maximum Record Size %lld KB\n", max_rec_size/1024);
+ sprintf(splash[splash_line++],"\tUsing Maximum Record Size %lld kB\n", max_rec_size/1024);
#endif
break;
@@ -2381,7 +2419,56 @@ char **argv;
/* if(subarg!=(char *)0) Error checking. */
/* printf("Plus option argument = >%s<\n",subarg);*/
break;
- case 'b': /* Example: Does not have an argument */
+ case 'b': /* burst */
+#ifdef NO_THREADS
+ if(trflag)
+ {
+ printf("Can not run throughput tests with burst option.\n");
+ exit(100);
+ }
+#endif
+ subarg=argv[optind++];
+ if(subarg==(char *)0)
+ {
+ printf("-+b takes an operand !!\n");
+ exit(200);
+ }
+ if (strchr(subarg,',') == NULL)
+ {
+ printf("-+b operand is of the format #,# (burst size (K/M/G) ,mili-second) !!\n");
+ exit(400);
+ }
+ burst_sleep_duration_msec = atoi(strchr(subarg,',') + 1);
+ if (burst_sleep_duration_msec == 0) {
+ printf("-+b cannot parse sleep duration !!\n");
+ exit(400);
+ }
+ *strchr(subarg,',') = '\0';
+ #ifdef NO_PRINT_LLD
+ sscanf(subarg,"%ld",&burst_size_kb_64);
+ #else
+ sscanf(subarg,"%lld",&burst_size_kb_64);
+ #endif
+ if(subarg[strlen(subarg)-1]=='k' ||
+ subarg[strlen(subarg)-1]=='K'){
+ ;
+ }
+ if(subarg[strlen(subarg)-1]=='m' ||
+ subarg[strlen(subarg)-1]=='M'){
+ burst_size_kb_64 = burst_size_kb_64 * 1024;
+ }
+ if(subarg[strlen(optarg)-1]=='g' ||
+ subarg[strlen(optarg)-1]=='G'){
+ burst_size_kb_64 = burst_size_kb_64 * 1024 * 1024;
+ }
+ if (burst_size_kb_64 <= 0) {
+ printf("-+b cannot parse burst size '%s'!!\n",subarg);
+ exit(400);
+ }
+ *(subarg + strlen(subarg)) = ','; /* so it will be printed when dumping the argsuments */
+ break;
+ case 'F': /* Example: Does not have an argument */
+ del_flag = 1;
break;
case 'c': /* Argument is the controlling host name */
/* I am a client for distributed Iozone */
@@ -2537,6 +2624,10 @@ char **argv;
share_file=1;
rlocking=1;
break;
+ case 'J': /* Thinktime is included in thrhoughput */
+ sprintf(splash[splash_line++],"\t>>> Think time is included in throughput cal. <<<\n");
+ inc_think=1;
+ break;
case 'V': /* No Record locking shared files*/
sprintf(splash[splash_line++],"\t>>> Shared file mode enabled. <<<\n");
share_file=1;
@@ -2630,7 +2721,7 @@ char **argv;
dedup_interior = 0;
if(dedup_interior >100)
dedup_interior = 100;
- sprintf(splash[splash_line++],"\tDedupe within & across %d percent.\n",dedup_interior);
+ sprintf(splash[splash_line++],"\tDedup within & across %d percent.\n",dedup_interior);
break;
case 'C': /* Argument is the percent of dedupe within & !across */
/* Sets size of dedup region within and !across files */
@@ -2645,7 +2736,7 @@ char **argv;
dedup_compress = 0;
if(dedup_compress >100)
dedup_compress = 100;
- sprintf(splash[splash_line++],"\tDedupe within %d percent.\n",dedup_compress);
+ sprintf(splash[splash_line++],"\tDedup within %d percent.\n",dedup_compress);
break;
case 'S': /* Argument is the seed for dedup */
subarg=argv[optind++];
@@ -2659,6 +2750,16 @@ char **argv;
dedup_mseed = 1;
sprintf(splash[splash_line++],"\tDedup manual seed %d .\n",dedup_mseed);
break;
+ case 'W': /* Argument is the child_skew for dedup */
+ subarg=argv[optind++];
+ if(subarg==(char *)0)
+ {
+ printf("-+W takes an operand !!\n");
+ exit(200);
+ }
+ chid_skew = atoi(subarg);
+ sprintf(splash[splash_line++],"\tDedup chid_skew %d .\n",chid_skew);
+ break;
case 'H': /* Argument is hostname of the PIT */
subarg=argv[optind++];
if(subarg==(char *)0)
@@ -2752,14 +2853,14 @@ char **argv;
if(!OPS_flag && !MS_flag)
{
- if(!silent) printf("\tOutput is in Kbytes/sec\n");
+ if(!silent) printf("\tOutput is in kBytes/sec\n");
}
if (min_rec_size > max_rec_size) {
#ifdef NO_PRINT_LLD
- printf("Error: minimum record size %ld KB is greater than maximum record size %ld KB\n ",
+ printf("Error: minimum record size %ld kB is greater than maximum record size %ld kB\n ",
min_rec_size/1024, max_rec_size/1024);
#else
- printf("Error: minimum record size %lld KB is greater than maximum record size %lld KB\n ",
+ printf("Error: minimum record size %lld kB is greater than maximum record size %lld kB\n ",
min_rec_size/1024, max_rec_size/1024);
#endif
exit(23);
@@ -2994,14 +3095,22 @@ char **argv;
init_record_sizes(min_rec_size,max_rec_size);
if(!silent) printf("\tTime Resolution = %1.6f seconds.\n",time_res);
#ifdef NO_PRINT_LLD
- if(!silent) printf("\tProcessor cache size set to %ld Kbytes.\n",cache_size/1024);
+ if(!silent) printf("\tProcessor cache size set to %ld kBytes.\n",cache_size/1024);
if(!silent) printf("\tProcessor cache line size set to %ld bytes.\n",cache_line_size);
if(!silent) printf("\tFile stride size set to %ld * record size.\n",stride);
#else
- if(!silent) printf("\tProcessor cache size set to %ld Kbytes.\n",cache_size/1024);
+ if(!silent) printf("\tProcessor cache size set to %ld kBytes.\n",cache_size/1024);
if(!silent) printf("\tProcessor cache line size set to %ld bytes.\n",cache_line_size);
if(!silent) printf("\tFile stride size set to %lld * record size.\n",stride);
#endif
+ if (burst_size_kb_64 != -1 && !silent)
+#ifdef NO_PRINT_LLD
+ printf("\tBurst size set to %ld Kbytes.\n\tBurst sleep duration set to %ld msec\n",
+ burst_size_kb_64, burst_sleep_duration_msec);
+#else
+ printf("\tBurst size set to %lld Kbytes.\n\tBurst sleep duration set to %lld msec\n",
+ burst_size_kb_64, burst_sleep_duration_msec);
+#endif
if(!rflag)
reclen=(long long)4096;
@@ -3127,7 +3236,7 @@ out:
if(res_prob)
{
printf("Timer resolution is poor. Some small transfers may have \n");
- printf("reported inaccurate results. Sizes %ld Kbytes and below.\n",
+ printf("reported inaccurate results. Sizes %ld kBytes and below.\n",
(long)(rec_prob/(long long)1024));
}
@@ -3350,11 +3459,11 @@ void signal_handler()
{
if(check_filename(filename))
unlink(filename); /* delete the file */
- }
- for(i=1;i<num_child;i++)
- {
- if(check_filename(dummyfile[i]))
+ for(i=1;i<num_child;i++)
+ {
+ if(check_filename(dummyfile[i]))
unlink(dummyfile[i]); /* delete the file */
+ }
}
if (!no_unlink)
{
@@ -3374,7 +3483,7 @@ void signal_handler()
if(res_prob)
{
printf("Timer resolution is poor. Some small transfers may have \n");
- printf("reported inaccurate results. Sizes %ld Kbytes and below.\n",
+ printf("reported inaccurate results. Sizes %ld kBytes and below.\n",
(long)rec_prob/1024);
}
if(trflag && !use_thread)
@@ -3389,7 +3498,7 @@ void signal_handler()
close(sp_msfd);
if(sp_mrfd)
close(sp_mrfd);
- exit(0);
+ exit(exit_code);
}
/****************************************************************/
@@ -3431,10 +3540,10 @@ void auto_test()
if (min_rec_size > (long long)(min_file_size*1024)) {
#ifdef NO_PRINT_LLD
- printf("Error: record length %ld is greater than filesize %ld KB\n ",
+ printf("Error: record length %ld is greater than filesize %ld kB\n ",
min_rec_size,min_file_size);
#else
- printf("Error: record length %lld is greater than filesize %lld KB\n ",
+ printf("Error: record length %lld is greater than filesize %lld kB\n ",
min_rec_size,min_file_size);
#endif
exit(23);
@@ -3557,7 +3666,26 @@ throughput_test()
if(OPS_flag)
unit="ops";
else
- unit="KB";
+ unit="kB";
+
+#ifndef NO_THREADS
+ /*Init barriers*/
+ if(use_thread)
+ {
+ barrier = (pthread_barrier_t*)alloc_mem(sizeof(pthread_barrier_t), 0); // Not shared
+ pthread_barrierattr_setpshared(&barrier_attr, PTHREAD_PROCESS_PRIVATE);
+ pthread_barrier_init(barrier, &barrier_attr, num_child);
+ }
+ else
+ {
+ barrier = (pthread_barrier_t*)alloc_mem(sizeof(pthread_barrier_t), 1); // Shared
+ pthread_barrierattr_setpshared(&barrier_attr, PTHREAD_PROCESS_SHARED);
+ pthread_barrier_init(barrier, &barrier_attr, num_child);
+ }
+
+ if (burst_size_kb_64 != -1)
+ burst_size_per_child = burst_size_kb_64 * 1024 / num_child;
+#endif
if(!haveshm)
{
@@ -3607,20 +3735,20 @@ throughput_test()
if(w_traj_flag)
{
#ifdef NO_PRINT_LLD
- if(!silent) printf("\tEach %s writes a %ld Kbyte file in telemetry controlled records\n",
+ if(!silent) printf("\tEach %s writes a %ld kByte file in telemetry controlled records\n",
port,kilobytes64);
#else
- if(!silent) printf("\tEach %s writes a %lld Kbyte file in telemetry controlled records\n",
+ if(!silent) printf("\tEach %s writes a %lld kByte file in telemetry controlled records\n",
port,kilobytes64);
#endif
}
else
{
#ifdef NO_PRINT_LLD
- if(!silent) printf("\tEach %s writes a %ld Kbyte file in %ld Kbyte records\n",
+ if(!silent) printf("\tEach %s writes a %ld kByte file in %ld kbyte records\n",
port,kilobytes64,reclen/1024);
#else
- if(!silent) printf("\tEach %s writes a %lld Kbyte file in %lld Kbyte records\n",
+ if(!silent) printf("\tEach %s writes a %lld kByte file in %lld kByte records\n",
port,kilobytes64,reclen/1024);
#endif
}
@@ -6822,6 +6950,12 @@ next10:
cleanup_comm();
}
}
+
+#ifndef NO_THREADS
+ /* Destroy the barrier */
+ pthread_barrier_destroy(barrier);
+#endif
+
/********************************************************/
/* End of cleanup */
/********************************************************/
@@ -6915,6 +7049,10 @@ long long length;
volatile long long x[4];
long long i;
where=(char *)buffer;
+
+ if(cache_line_size == 0) /* This shouldn't be needed */
+ cache_line_size=CACHE_LINE_SIZE;
+
for(i=0;i<(length/cache_line_size);i++)
{
x[(i & 3)]=*(where);
@@ -7041,12 +7179,12 @@ char sverify;
printf("Error in file: Found ?%lx? Expecting ?%lx? addr %lx\n",*where, (long long)((pattern_buf<<32)|pattern_buf),where);
printf("Error in file: Position %ld \n",file_position);
printf("Record # %ld Record size %ld kb \n",recnum,recsize/1024);
- printf("where %8.8llx loop %ld\n",where,i);
+ printf("where %8.8lx loop %ld\n",where,i);
#else
printf("Error in file: Found ?%llx? Expecting ?%llx? addr %lx\n",*where, (long long)((pattern_buf<<32)|pattern_buf),((long)where));
printf("Error in file: Position %lld \n",file_position);
printf("Record # %lld Record size %lld kb \n",recnum,recsize/1024);
- printf("where %8.8lx loop %lld\n",(long)where,(long long)i);
+ printf("where %px loop %lld\n",where,(long long)i);
#endif
return(1);
}
@@ -7262,6 +7400,8 @@ long long *data1;
long long *data2;
#endif
{
+ double burst_sleep_time_till_now[2] = {0, 0};
+
double starttime1;
double writetime[2];
double walltime[2], cputime[2];
@@ -7324,14 +7464,14 @@ long long *data2;
printf("Unable to open wol.dat\n");
exit(40);
}
- fprintf(wqfd,"Offset in Kbytes Latency in microseconds Transfer size in bytes\n");
+ fprintf(wqfd,"Offset in kBytes Latency in microseconds Transfer size in bytes\n");
rwqfd=fopen("rwol.dat","a");
if(rwqfd==0)
{
printf("Unable to open rwol.dat\n");
exit(41);
}
- fprintf(rwqfd,"Offset in Kbytes Latency in microseconds Transfer size in bytes\n");
+ fprintf(rwqfd,"Offset in kBytes Latency in microseconds Transfer size in bytes\n");
}
fd = 0;
if(oflag)
@@ -7527,6 +7667,7 @@ long long *data2;
#endif
if(wval==-1)
perror("write");
+ exit_code = 74;
signal_handler();
}
I_LSEEK(fd,0,SEEK_SET);
@@ -7597,8 +7738,16 @@ long long *data2;
if(Index > (MAXBUFFERSIZE-reclen))
Index=0;
pbuff = mbuffer + Index;
- if(verify || dedup || dedup_interior)
+ if(diag_v)
+ {
+ if(verify || dedup || dedup_interior)
+ fill_buffer(pbuff,reclen,(long long)pattern,sverify,(long long)i);
+ }
+ else
+ {
+ if(verify || dedup || dedup_interior)
fill_buffer(pbuff,reclen,(long long)pattern,sverify,(long long)0);
+ }
}
if(async_flag && no_copy_flag)
{
@@ -7659,11 +7808,16 @@ long long *data2;
#endif
if(wval == -1)
perror("write");
+ exit_code = 74;
signal_handler();
}
#if defined(Windows)
}
#endif
+ /* The burst work does not work for async or memory
+ * mapped IO */
+ if (wval != -1)
+ update_burst_sleep(fd, wval, &burst_sleep_time_till_now[j]);
}
}
if(hist_summary)
@@ -7753,7 +7907,10 @@ long long *data2;
signal_handler();
}
}
- writetime[j] = ((time_so_far() - starttime1)-time_res)
+ if(inc_think)
+ writetime[j] = ((time_so_far() - starttime1)-time_res - burst_sleep_time_till_now[j]);
+ else
+ writetime[j] = ((time_so_far() - starttime1)-time_res - burst_sleep_time_till_now[j])
-compute_val;
if(writetime[j] < (double).000001)
{
@@ -7840,12 +7997,12 @@ long long *data2;
store_times(walltime[1], cputime[1]);
store_value((off64_t)writerate[1]);
#ifdef NO_PRINT_LLD
- if(!silent) printf("%8ld",writerate[0]);
- if(!silent) printf("%8ld",writerate[1]);
+ if(!silent) printf("%9ld",writerate[0]);
+ if(!silent) printf("%9ld",writerate[1]);
if(!silent) fflush(stdout);
#else
- if(!silent) printf("%8lld",writerate[0]);
- if(!silent) printf("%8lld",writerate[1]);
+ if(!silent) printf("%9lld",writerate[0]);
+ if(!silent) printf("%9lld",writerate[1]);
if(!silent) fflush(stdout);
#endif
}
@@ -7863,6 +8020,7 @@ long long *data1;
long long *data2;
#endif
{
+ double burst_sleep_time_till_now[2] = {0, 0};
double starttime1;
double writetime[2];
double walltime[2], cputime[2];
@@ -7965,8 +8123,10 @@ long long *data2;
fd);
#endif
perror("fwrite");
+ exit_code = 74;
signal_handler();
}
+ update_burst_sleep(fd, reclen, &burst_sleep_time_till_now[j]);
}
if(include_flush)
@@ -7986,7 +8146,10 @@ long long *data2;
signal_handler();
}
}
- writetime[j] = ((time_so_far() - starttime1)-time_res)
+ if(inc_think)
+ writetime[j] = ((time_so_far() - starttime1)-time_res - burst_sleep_time_till_now[j]);
+ else
+ writetime[j] = ((time_so_far() - starttime1)-time_res - burst_sleep_time_till_now[j])
-compute_val;
if(writetime[j] < (double).000001)
{
@@ -8195,7 +8358,10 @@ long long *data1,*data2;
{
fclose(stream);
}
- readtime[j] = ((time_so_far() - starttime2)-time_res)
+ if(inc_think)
+ readtime[j] = ((time_so_far() - starttime2)-time_res);
+ else
+ readtime[j] = ((time_so_far() - starttime2)-time_res)
-compute_val;
if(readtime[j] < (double).000001)
{
@@ -8260,11 +8426,11 @@ long long *data1,*data2;
store_times(walltime[1], cputime[1]);
store_value((off64_t)readrate[1]);
#ifdef NO_PRINT_LLD
- if(!silent) printf("%8ld",readrate[0]);
+ if(!silent) printf("%9ld",readrate[0]);
if(!silent) printf("%9ld",readrate[1]);
if(!silent) fflush(stdout);
#else
- if(!silent) printf("%8lld",readrate[0]);
+ if(!silent) printf("%9lld",readrate[0]);
if(!silent) printf("%9lld",readrate[1]);
if(!silent) fflush(stdout);
#endif
@@ -8356,14 +8522,14 @@ long long *data1,*data2;
printf("Unable to open rol.dat\n");
exit(56);
}
- fprintf(rqfd,"Offset in Kbytes Latency in microseconds Transfer size in bytes\n");
+ fprintf(rqfd,"Offset in kBytes Latency in microseconds Transfer size in bytes\n");
rrqfd=fopen("rrol.dat","a");
if(rrqfd==0)
{
printf("Unable to open rrol.dat\n");
exit(57);
}
- fprintf(rrqfd,"Offset in Kbytes Latency in microseconds Transfer size in bytes\n");
+ fprintf(rrqfd,"Offset in kBytes Latency in microseconds Transfer size in bytes\n");
}
/*
* begin real testing
@@ -8692,7 +8858,10 @@ long long *data1,*data2;
#endif
close(fd);
}
- readtime[j] = ((time_so_far() - starttime2)-time_res)-compute_val;
+ if(inc_think)
+ readtime[j] = ((time_so_far() - starttime2)-time_res);
+ else
+ readtime[j] = ((time_so_far() - starttime2)-time_res)-compute_val;
if(readtime[j] < (double).000001)
{
readtime[j]= time_res;
@@ -8805,6 +8974,7 @@ long long *data1, *data2;
long long j;
off64_t i,numrecs64;
long long Index=0;
+ double burst_sleep_time_till_now[2] = {0, 0};
int flags;
unsigned long long randreadrate[2];
off64_t filebytes64;
@@ -8975,7 +9145,7 @@ long long *data1, *data2;
#endif
compute_val=(double)0;
starttime2 = time_so_far();
- if ( j==0 ){
+ if ( j==0 ){ /* start read */
for(i=0; i<numrecs64; i++) {
if(compute_flag)
compute_val+=do_compute(compute_time);
@@ -9087,7 +9257,7 @@ long long *data1, *data2;
lock_offset, reclen);
}
}
- }
+ } /* start write */
else
{
if(verify || dedup || dedup_interior)
@@ -9185,8 +9355,11 @@ long long *data1, *data2;
#endif
if(wval==-1)
perror("write");
+ exit_code = 74;
signal_handler();
}
+ if (wval != -1)
+ update_burst_sleep(fd, wval, &burst_sleep_time_till_now[j]);
}
}
if(rlocking)
@@ -9228,7 +9401,10 @@ long long *data1, *data2;
signal_handler();
}
}
- randreadtime[j] = ((time_so_far() - starttime2)-time_res)-
+ if(inc_think)
+ randreadtime[j] = ((time_so_far() - starttime2)-time_res - burst_sleep_time_till_now[j]);
+ else
+ randreadtime[j] = ((time_so_far() - starttime2)-time_res - burst_sleep_time_till_now[j])-
compute_val;
if(randreadtime[j] < (double).000001)
{
@@ -9302,12 +9478,12 @@ long long *data1, *data2;
store_times(walltime[1], cputime[1]);
store_value((off64_t)randreadrate[1]);
#ifdef NO_PRINT_LLD
- if(!silent) printf("%8ld",randreadrate[0]);
- if(!silent) printf("%8ld",randreadrate[1]);
+ if(!silent) printf("%9ld",randreadrate[0]);
+ if(!silent) printf("%9ld",randreadrate[1]);
if(!silent) fflush(stdout);
#else
- if(!silent) printf("%8lld",randreadrate[0]);
- if(!silent) printf("%8lld",randreadrate[1]);
+ if(!silent) printf("%9lld",randreadrate[0]);
+ if(!silent) printf("%9lld",randreadrate[1]);
if(!silent) fflush(stdout);
#endif
if(recnum)
@@ -9545,7 +9721,10 @@ long long *data1,*data2;
}
close(fd);
}
- revreadtime[j] = ((time_so_far() - starttime2)-time_res)
+ if(inc_think)
+ revreadtime[j] = ((time_so_far() - starttime2)-time_res);
+ else
+ revreadtime[j] = ((time_so_far() - starttime2)-time_res)
-compute_val;
if(revreadtime[j] < (double).000001)
{
@@ -9600,9 +9779,9 @@ long long *data1,*data2;
store_times(walltime[0], cputime[0]);
store_value((off64_t)revreadrate[0]);
#ifdef NO_PRINT_LLD
- if(!silent) printf("%8ld",revreadrate[0]);
+ if(!silent) printf("%9ld",revreadrate[0]);
#else
- if(!silent) printf("%8lld",revreadrate[0]);
+ if(!silent) printf("%9lld",revreadrate[0]);
#endif
if(!silent) fflush(stdout);
}
@@ -9620,6 +9799,7 @@ long long reclen;
long long *data1,*data2;
#endif
{
+ double burst_sleep_time_till_now = 0;
double writeintime;
double starttime1;
double walltime, cputime;
@@ -9739,6 +9919,7 @@ long long *data1,*data2;
#endif
if(wval==-1)
perror("write");
+ exit_code = 74;
signal_handler();
}
*/
@@ -9779,7 +9960,7 @@ long long *data1,*data2;
purgeit(nbuff,reclen);
if(mmapflag)
{
- wmaddr = &maddr[i*reclen];
+ wmaddr = &maddr[0];
fill_area((long long*)nbuff,(long long*)wmaddr,(long long)reclen);
if(!mmapnsflag)
{
@@ -9810,8 +9991,11 @@ long long *data1,*data2;
#endif
if(wval==-1)
perror("write");
+ exit_code = 74;
signal_handler();
}
+ if (wval != -1)
+ update_burst_sleep(fd, wval, &burst_sleep_time_till_now);
}
}
if(rlocking)
@@ -9855,7 +10039,10 @@ long long *data1,*data2;
signal_handler();
}
}
- writeintime = ((time_so_far() - starttime1)-time_res)-
+ if(inc_think)
+ writeintime = ((time_so_far() - starttime1)-time_res);
+ else
+ writeintime = ((time_so_far() - starttime1)-time_res)-
compute_val;
if(cpuutilflag)
{
@@ -9866,6 +10053,7 @@ long long *data1,*data2;
if (walltime < cputime)
walltime = cputime;
}
+ writeintime -= burst_sleep_time_till_now;
if(writeintime < (double).000001)
{
writeintime= time_res;
@@ -9914,9 +10102,9 @@ long long *data1,*data2;
store_times(walltime, cputime);
store_value((off64_t)writeinrate);
#ifdef NO_PRINT_LLD
- if(!silent) printf(" %8ld",writeinrate);
+ if(!silent) printf(" %9ld",writeinrate);
#else
- if(!silent) printf(" %8lld",writeinrate);
+ if(!silent) printf(" %9lld",writeinrate);
#endif
if(!silent) fflush(stdout);
if(restf)
@@ -10193,7 +10381,10 @@ long long *data1, *data2;
}
close(fd);
}
- strideintime = ((time_so_far() - starttime1)-time_res)
+ if(inc_think)
+ strideintime = ((time_so_far() - starttime1)-time_res);
+ else
+ strideintime = ((time_so_far() - starttime1)-time_res)
-compute_val;
if(strideintime < (double).000001)
{
@@ -10234,9 +10425,9 @@ long long *data1, *data2;
store_times(walltime, cputime);
store_value((off64_t)strideinrate);
#ifdef NO_PRINT_LLD
- if(!silent) printf(" %8ld",strideinrate);
+ if(!silent) printf(" %9ld",strideinrate);
#else
- if(!silent) printf(" %8lld",strideinrate);
+ if(!silent) printf(" %9lld",strideinrate);
#endif
if(!silent) fflush(stdout);
if(restf)
@@ -10257,6 +10448,7 @@ long long reclen;
long long *data1,*data2;
#endif
{
+ double burst_sleep_time_till_now[2] = {0, 0};
double pwritetime[2];
double starttime1;
double walltime[2], cputime[2];
@@ -10414,7 +10606,10 @@ long long *data1,*data2;
fd);
#endif
perror("pwrite");
+ exit_code = 74;
signal_handler();
+ } else {
+ update_burst_sleep(fd, reclen, &burst_sleep_time_till_now[j]);
}
if(rlocking)
{
@@ -10438,7 +10633,10 @@ long long *data1,*data2;
signal_handler();
}
}
- pwritetime[j] = ((time_so_far() - starttime1)-time_res)
+ if(inc_think)
+ pwritetime[j] = ((time_so_far() - starttime1)-time_res - burst_sleep_time_till_now[j]);
+ else
+ pwritetime[j] = ((time_so_far() - starttime1)-time_res - burst_sleep_time_till_now[j])
-compute_val;
if(pwritetime[j] < (double).000001)
{
@@ -10512,7 +10710,7 @@ long long *data1,*data2;
if(!silent) printf("%9ld",pwriterate[1]);
if(!silent) fflush(stdout);
#else
- if(!silent) printf("%8lld",pwriterate[0]);
+ if(!silent) printf("%9lld",pwriterate[0]);
if(!silent) printf("%9lld",pwriterate[1]);
if(!silent) fflush(stdout);
#endif
@@ -10690,7 +10888,10 @@ long long *data1, *data2;
fsync(fd);
if(include_close)
close(fd);
- preadtime[j] = ((time_so_far() - starttime2)-time_res)
+ if(inc_think)
+ preadtime[j] = ((time_so_far() - starttime2)-time_res);
+ else
+ preadtime[j] = ((time_so_far() - starttime2)-time_res)
-compute_val;
if(preadtime[j] < (double).000001)
{
@@ -10953,7 +11154,10 @@ long long *data1,*data2;
signal_handler();
}
}
- pwritevtime[j] = ((time_so_far() - starttime1)-time_res)
+ if(inc_think)
+ pwritevtime[j] = ((time_so_far() - starttime1)-time_res);
+ else
+ pwritevtime[j] = ((time_so_far() - starttime1)-time_res)
-compute_val;
if(pwritevtime[j] < (double).000001)
{
@@ -11265,7 +11469,10 @@ long long *data1,*data2;
fsync(fd);
if(include_close)
close(fd);
- preadvtime[j] = ((time_so_far() - starttime2)-time_res)
+ if(inc_think)
+ preadvtime[j] = ((time_so_far() - starttime2)-time_res);
+ else
+ preadvtime[j] = ((time_so_far() - starttime2)-time_res)
-compute_val;
if(preadvtime[j] < (double).000001)
{
@@ -11383,7 +11590,7 @@ void print_header()
#endif
);
if(!silent) printf(CONTROL_STRING2,
- "KB",
+ "kB",
"reclen",
"write",
"rewrite",
@@ -11422,7 +11629,7 @@ void print_header()
" " /*kcollins 8-21-96*/
); /*kcollins 8-21-96*/
if(!silent) printf(CONTROL_STRING4, /*kcollins 8-21-96*/
- "KB", /*kcollins 8-21-96*/
+ "kB", /*kcollins 8-21-96*/
"reclen", /*kcollins 8-21-96*/
"write", /*kcollins 8-21-96*/
"rewrite", /*kcollins 8-21-96*/
@@ -11450,7 +11657,7 @@ void print_header()
""
);
if(!silent) printf(CONTROL_STRING3,
- "KB",
+ "kB",
"reclen",
"write",
"rewrite",
@@ -11486,7 +11693,7 @@ void print_header()
""
);
if(!silent) printf(CONTROL_STRING3,
- "KB",
+ "kB",
"reclen",
"write",
"rewrite",
@@ -12093,7 +12300,7 @@ int shared_flag;
size1=l_max(size,page_size);
size1=(size1 +page_size) & ~(page_size-1);
-#if defined(bsd4_2) && !defined(macosx)
+#if defined(bsd4_2) && !defined(IOZ_macosx)
if((tfd = creat("mmap.tmp", 0666))<0)
{
printf("Unable to create tmp file\n");
@@ -12356,6 +12563,7 @@ thread_write_test( x)
#else
long long *gc=0;
#endif
+ double burst_acc_time_sec = 0;
if(compute_flag)
delay=compute_time;
@@ -12469,6 +12677,8 @@ thread_write_test( x)
flags=O_RDWR|O_SYNC|O_CREAT;
else
flags=O_RDWR|O_CREAT;
+ if(del_flag && mix_test)
+ flags |= O_TRUNC;
#if defined(O_DSYNC)
if(odsync)
flags |= O_DSYNC;
@@ -12606,7 +12816,7 @@ thread_write_test( x)
printf("Unable to open %s\n",tmpname);
exit(40);
}
- fprintf(thread_wqfd,"Offset in Kbytes Latency in microseconds Transfer size in bytes\n");
+ fprintf(thread_wqfd,"Offset in kBytes Latency in microseconds Transfer size in bytes\n");
}
if(L_flag)
{
@@ -12677,7 +12887,7 @@ thread_write_test( x)
close(fd);
}
child_stat->throughput =
- (time_so_far() - starttime1)-time_res;
+ (time_so_far() - starttime1)-time_res - burst_acc_time_sec;
if(include_close)
{
if((fd = I_OPEN(dummyfile[xx], (int)flags,0))<0)
@@ -12759,6 +12969,11 @@ again:
{
#endif
wval=write(fd, nbuff, (size_t) reclen);
+
+#ifndef NO_THREADS
+ count_burst(&burst_acc_time_sec, xx);
+#endif
+
#if defined(Windows)
}
#endif
@@ -12774,7 +12989,7 @@ again:
}
temp_time = time_so_far();
child_stat->throughput =
- (temp_time - starttime1)-time_res;
+ (temp_time - starttime1)-time_res - burst_acc_time_sec;
if(child_stat->throughput < (double).000001)
{
child_stat->throughput= time_res;
@@ -12903,7 +13118,10 @@ printf("Desired rate %g Actual rate %g Nap %g microseconds\n",desired_op_rate_t
}
if(!stopped){
temp_time = time_so_far();
- child_stat->throughput = ((temp_time - starttime1)-time_res)
+ if(inc_think)
+ child_stat->throughput = ((temp_time - starttime1)-time_res - burst_acc_time_sec);
+ else
+ child_stat->throughput = ((temp_time - starttime1)-time_res - burst_acc_time_sec)
-compute_val;
if(child_stat->throughput < (double).000001)
{
@@ -12944,7 +13162,11 @@ printf("Desired rate %g Actual rate %g Nap %g microseconds\n",desired_op_rate_t
(long long)CHILD_STATE_HOLD);
if (debug1) {
+#ifdef NO_PRINT_LLD
+ printf(" child/slot: %ld, wall-cpu: %8.3f %8.3fC" " -> %6.2f%%\n",
+#else
printf(" child/slot: %lld, wall-cpu: %8.3f %8.3fC" " -> %6.2f%%\n",
+#endif
xx, walltime, cputime,
cpu_util(cputime, walltime));
}
@@ -13289,7 +13511,7 @@ thread_pwrite_test( x)
printf("Unable to open %s\n",tmpname);
exit(40);
}
- fprintf(thread_wqfd,"Offset in Kbytes Latency in microseconds Transfer size in bytes\n");
+ fprintf(thread_wqfd,"Offset in kBytes Latency in microseconds Transfer size in bytes\n");
}
if(L_flag)
{
@@ -13339,8 +13561,12 @@ thread_pwrite_test( x)
else
fsync(fd);
}
- child_stat->throughput =
- (time_so_far() - starttime1)-time_res;
+ temp_time = time_so_far();
+ if(inc_think)
+ child_stat->throughput = ((temp_time - starttime1)-time_res);
+ else
+ child_stat->throughput = ((temp_time - starttime1)-time_res)
+ -compute_val;
if(child_stat->throughput < (double).000001)
{
child_stat->throughput = time_res;
@@ -13536,8 +13762,11 @@ printf("Desired rate %g Actual rate %g Nap %g microseconds\n",desired_op_rate_t
}
if(!stopped){
temp_time = time_so_far();
- child_stat->throughput = ((temp_time - starttime1)-time_res)
- -compute_val;
+ if(inc_think)
+ child_stat->throughput = ((temp_time - starttime1)-time_res);
+ else
+ child_stat->throughput = ((temp_time - starttime1)-time_res)
+ -compute_val;
if(child_stat->throughput < (double).000001)
{
child_stat->throughput= time_res;
@@ -13577,7 +13806,11 @@ printf("Desired rate %g Actual rate %g Nap %g microseconds\n",desired_op_rate_t
(long long)CHILD_STATE_HOLD);
if (debug1) {
+#ifdef NO_PRINT_LLD
+ printf(" child/slot: %ld, wall-cpu: %8.3f %8.3fC" " -> %6.2f%%\n",
+#else
printf(" child/slot: %lld, wall-cpu: %8.3f %8.3fC" " -> %6.2f%%\n",
+#endif
xx, walltime, cputime,
cpu_util(cputime, walltime));
}
@@ -13684,6 +13917,8 @@ thread_rwrite_test(x)
long long *gc=0;
#endif
+ double burst_acc_time_sec = 0;
+
if(compute_flag)
delay=compute_time;
wmaddr=nbuff=maddr=free_addr=0;
@@ -13877,7 +14112,7 @@ thread_rwrite_test(x)
send_stop();
exit(40);
}
- fprintf(thread_rwqfd,"Offset in Kbytes Latency in microseconds Transfer size in bytes\n");
+ fprintf(thread_rwqfd,"Offset in kBytes Latency in microseconds Transfer size in bytes\n");
}
if(L_flag)
{
@@ -13985,7 +14220,11 @@ thread_rwrite_test(x)
wmaddr = &maddr[i*reclen];
if(cdebug)
{
+#ifdef NO_PRINT_LLD
+fprintf(newstdout,"Chid: %ld Rewriting offset %ld for length of %ld\n",chid, i*reclen,reclen);
+#else
fprintf(newstdout,"Chid: %lld Rewriting offset %lld for length of %lld\n",chid, i*reclen,reclen);
+#endif
fflush(newstdout);
}
fill_area((long long*)nbuff,(long long*)wmaddr,(long long)reclen);
@@ -14022,6 +14261,10 @@ fprintf(newstdout,"Chid: %lld Rewriting offset %lld for length of %lld\n",chid,
else
#endif
wval=write(fd, nbuff, (size_t) reclen);
+
+#ifndef NO_THREADS
+ count_burst(&burst_acc_time_sec, xx);
+#endif
if(wval != reclen)
{
if(*stop_flag)
@@ -14039,6 +14282,7 @@ fprintf(newstdout,"Chid: %lld Rewriting offset %lld for length of %lld\n",chid,
#endif
if(wval==-1)
perror("write");
+ exit_code = 74;
if (!no_unlink)
{
if(check_filename(dummyfile[xx]))
@@ -14123,7 +14367,10 @@ printf("Desired rate %g Actual rate %g Nap %g microseconds\n",desired_op_rate_t
}
temp_time=time_so_far();
child_stat=(struct child_stats *)&shmaddr[xx];
- child_stat->throughput = ((temp_time - starttime1)-time_res)
+ if(inc_think)
+ child_stat->throughput = ((temp_time - starttime1)-time_res - burst_acc_time_sec);
+ else
+ child_stat->throughput = ((temp_time - starttime1)-time_res - burst_acc_time_sec)
-compute_val;
if(child_stat->throughput < (double).000001)
{
@@ -14454,7 +14701,7 @@ thread_read_test(x)
printf("Unable to open %s\n",tmpname);
exit(40);
}
- fprintf(thread_rqfd,"Offset in Kbytes Latency in microseconds Transfer size in bytes\n");
+ fprintf(thread_rqfd,"Offset in kBytes Latency in microseconds Transfer size in bytes\n");
}
if(L_flag)
{
@@ -14710,8 +14957,11 @@ printf("Desired rate %g Actual rate %g Nap %g microseconds\n",desired_op_rate_t
}
temp_time = time_so_far();
child_stat=(struct child_stats *)&shmaddr[xx];
- child_stat->throughput = ((temp_time - starttime1)-time_res)
- -compute_val;
+ if(inc_think)
+ child_stat->throughput = ((temp_time - starttime1)-time_res);
+ else
+ child_stat->throughput = ((temp_time - starttime1)-time_res)
+ -compute_val;
if(child_stat->throughput < (double).000001)
{
child_stat->throughput= time_res;
@@ -15012,7 +15262,7 @@ thread_pread_test(x)
printf("Unable to open %s\n",tmpname);
exit(40);
}
- fprintf(thread_rqfd,"Offset in Kbytes Latency in microseconds Transfer size in bytes\n");
+ fprintf(thread_rqfd,"Offset in kBytes Latency in microseconds Transfer size in bytes\n");
}
if(L_flag)
{
@@ -15237,8 +15487,11 @@ printf("Desired rate %g Actual rate %g Nap %g microseconds\n",desired_op_rate_t
}
temp_time = time_so_far();
child_stat=(struct child_stats *)&shmaddr[xx];
- child_stat->throughput = ((temp_time - starttime1)-time_res)
- -compute_val;
+ if(inc_think)
+ child_stat->throughput = ((temp_time - starttime1)-time_res);
+ else
+ child_stat->throughput = ((temp_time - starttime1)-time_res)
+ -compute_val;
if(child_stat->throughput < (double).000001)
{
child_stat->throughput= time_res;
@@ -15563,7 +15816,7 @@ thread_rread_test(x)
printf("Unable to open %s\n",tmpname);
exit(40);
}
- fprintf(thread_rrqfd,"Offset in Kbytes Latency in microseconds Transfer size in bytes\n");
+ fprintf(thread_rrqfd,"Offset in kBytes Latency in microseconds Transfer size in bytes\n");
}
if(L_flag)
{
@@ -15817,8 +16070,11 @@ printf("Desired rate %g Actual rate %g Nap %g microseconds\n",desired_op_rate_t
close(fd);
}
temp_time = time_so_far();
- child_stat->throughput = ((temp_time - starttime1)-time_res)
- -compute_val;
+ if(inc_think)
+ child_stat->throughput = ((temp_time - starttime1)-time_res);
+ else
+ child_stat->throughput = ((temp_time - starttime1)-time_res)
+ -compute_val;
if(child_stat->throughput < (double).000001)
{
child_stat->throughput= time_res;
@@ -16120,7 +16376,7 @@ thread_reverse_read_test(x)
printf("Unable to open %s\n",tmpname);
exit(40);
}
- fprintf(thread_revqfd,"Offset in Kbytes Latency in microseconds Transfer size in bytes\n");
+ fprintf(thread_revqfd,"Offset in kBytes Latency in microseconds Transfer size in bytes\n");
}
if(L_flag)
{
@@ -16360,8 +16616,11 @@ printf("Desired rate %g Actual rate %g Nap %g microseconds\n",desired_op_rate_t
close(fd);
}
temp_time = time_so_far();
- child_stat->throughput = ((temp_time - starttime2)-time_res)
- -compute_val;
+ if(inc_think)
+ child_stat->throughput = ((temp_time - starttime2)-time_res);
+ else
+ child_stat->throughput = ((temp_time - starttime2)-time_res)
+ -compute_val;
if(child_stat->throughput < (double).000001)
{
child_stat->throughput= time_res;
@@ -16653,7 +16912,7 @@ thread_stride_read_test(x)
printf("Unable to open %s\n",tmpname);
exit(40);
}
- fprintf(thread_strqfd,"Offset in Kbytes Latency in microseconds Transfer size in bytes\n");
+ fprintf(thread_strqfd,"Offset in kBytes Latency in microseconds Transfer size in bytes\n");
}
if(L_flag)
{
@@ -16902,8 +17161,11 @@ printf("Desired rate %g Actual rate %g Nap %g microseconds\n",desired_op_rate_t
close(fd);
}
temp_time = time_so_far();
- child_stat->throughput = ((temp_time - starttime2)-time_res)
- -compute_val;
+ if(inc_think)
+ child_stat->throughput = ((temp_time - starttime2)-time_res);
+ else
+ child_stat->throughput = ((temp_time - starttime2)-time_res)
+ -compute_val;
if(child_stat->throughput < (double).000001)
{
child_stat->throughput= time_res;
@@ -16997,6 +17259,7 @@ thread_mix_test(x)
int num_readers;
long xx;
+ mix_test = 1;
#ifdef NO_THREADS
xx=chid;
#else
@@ -17330,7 +17593,7 @@ thread_ranread_test(x)
printf("Unable to open %s\n",tmpname);
exit(40);
}
- fprintf(thread_randrfd,"Offset in Kbytes Latency in microseconds Transfer size in bytes\n");
+ fprintf(thread_randrfd,"Offset in kBytes Latency in microseconds Transfer size in bytes\n");
}
if(L_flag)
{
@@ -17583,8 +17846,11 @@ printf("Desired rate %g Actual rate %g Nap %g microseconds\n",desired_op_rate_t
}
temp_time = time_so_far();
child_stat=(struct child_stats *)&shmaddr[xx];
- child_stat->throughput = ((temp_time - starttime1)-time_res)
- -compute_val;
+ if(inc_think)
+ child_stat->throughput = ((temp_time - starttime1)-time_res);
+ else
+ child_stat->throughput = ((temp_time - starttime1)-time_res)
+ -compute_val;
if(child_stat->throughput < (double).000001)
{
child_stat->throughput= time_res;
@@ -17731,6 +17997,8 @@ thread_ranwrite_test( x)
unsigned long long init[4]={0x12345ULL, 0x23456ULL, 0x34567ULL, 0x45678ULL}, length=4;
#endif
+ double burst_acc_time_sec = 0;
+
if(compute_flag)
delay=compute_time;
hist_time=thread_qtime_stop=thread_qtime_start=0;
@@ -17987,7 +18255,7 @@ thread_ranwrite_test( x)
printf("Unable to open %s\n",tmpname);
exit(40);
}
- fprintf(thread_randwqfd,"Offset in Kbytes Latency in microseconds Transfer size in bytes\n");
+ fprintf(thread_randwqfd,"Offset in kBytes Latency in microseconds Transfer size in bytes\n");
}
if(L_flag)
{
@@ -18071,7 +18339,7 @@ thread_ranwrite_test( x)
fsync(fd);
}
child_stat->throughput =
- (time_so_far() - starttime1)-time_res;
+ (time_so_far() - starttime1)-time_res - burst_acc_time_sec;
if(child_stat->throughput < (double).000001)
{
child_stat->throughput = time_res;
@@ -18130,6 +18398,11 @@ again:
else
{
wval = write(fd, nbuff, (size_t) reclen);
+
+#ifndef NO_THREADS
+ count_burst(&burst_acc_time_sec, xx);
+#endif
+
if(wval != reclen)
{
if(*stop_flag && !stopped){
@@ -18142,7 +18415,7 @@ again:
}
temp_time = time_so_far();
child_stat->throughput =
- (temp_time - starttime1)-time_res;
+ (temp_time - starttime1)-time_res - burst_acc_time_sec;
if(child_stat->throughput < (double).000001)
{
child_stat->throughput= time_res;
@@ -18266,8 +18539,11 @@ printf("Desired rate %g Actual rate %g Nap %g microseconds\n",desired_op_rate_t
}
if(!stopped){
temp_time = time_so_far();
- child_stat->throughput = ((temp_time - starttime1)-time_res)
- -compute_val;
+ if(inc_think)
+ child_stat->throughput = ((temp_time - starttime1)-time_res - burst_acc_time_sec);
+ else
+ child_stat->throughput = ((temp_time - starttime1)-time_res - burst_acc_time_sec)
+ -compute_val;
if(child_stat->throughput < (double).000001)
{
child_stat->throughput= time_res;
@@ -18640,19 +18916,19 @@ dump_throughput_cpu()
do_label(bif_fd, print_str, bif_row++, bif_column);
}
label = OPS_flag ? "ops/sec" :
- MS_flag ? "microseconds/op" : "Kbytes/sec";
+ MS_flag ? "microseconds/op" : "kBytes/sec";
#ifdef NO_PRINT_LLD
- if(!silent) printf("\"Record size = %ld Kbytes \"\n", reclen/1024);
+ if(!silent) printf("\"Record size = %ld kBytes \"\n", reclen/1024);
#else
- if(!silent) printf("\"Record size = %lld Kbytes \"\n", reclen/1024);
+ if(!silent) printf("\"Record size = %lld kBytes \"\n", reclen/1024);
#endif
if(!silent) printf("\"Output is in CPU%%\"\n\n");
if (bif_flag)
{
#ifdef NO_PRINT_LLD
- sprintf(print_str, "Record size = %ld Kbytes", reclen/1024);
+ sprintf(print_str, "Record size = %ld kBytes", reclen/1024);
#else
- sprintf(print_str, "Record size = %lld Kbytes", reclen/1024);
+ sprintf(print_str, "Record size = %lld kBytes", reclen/1024);
#endif
do_label(bif_fd, print_str, bif_row++, bif_column);
sprintf(print_str, "Output is in CPU%%");
@@ -18719,19 +18995,19 @@ dump_throughput()
if(MS_flag)
label="microseconds/op";
else
- label="Kbytes/sec";
+ label="kBytes/sec";
#ifdef NO_PRINT_LLD
- if(!silent) printf("\"Record size = %ld Kbytes \"\n",reclen/1024);
+ if(!silent) printf("\"Record size = %ld kBytes \"\n",reclen/1024);
#else
- if(!silent) printf("\"Record size = %lld Kbytes \"\n",reclen/1024);
+ if(!silent) printf("\"Record size = %lld kBytes \"\n",reclen/1024);
#endif
if(!silent) printf("\"Output is in %s\"\n\n",label);
if(bif_flag)
{
#ifdef NO_PRINT_LLD
- sprintf(print_str,"Record size = %ld Kbytes",reclen/1024);
+ sprintf(print_str,"Record size = %ld kBytes",reclen/1024);
#else
- sprintf(print_str,"Record size = %lld Kbytes",reclen/1024);
+ sprintf(print_str,"Record size = %lld kBytes",reclen/1024);
#endif
do_label(bif_fd,print_str,bif_row++,bif_column);
sprintf(print_str,"Output is in %s",label);
@@ -18906,7 +19182,7 @@ int flag, prot;
#endif
#endif
-#if defined(bsd4_2) && !defined(macosx)
+#if defined(bsd4_2) && !defined(IOZ_macosx)
pa = (char *)mmap( 0,&filebytes, (int)prot,
(int)mflags, (int)fd, 0);
#else
@@ -19094,28 +19370,21 @@ my_unap( microsecs )
unsigned long long microsecs;
#endif
{
- struct timeval nap_time;
- int seconds;
double timein, timeout;
+ unsigned long usecs;
- seconds = (int)(microsecs/1000000.0); /* Now in seconds */
- nap_time.tv_sec=seconds;
- nap_time.tv_usec=(int)microsecs;
+ usecs = (unsigned long) microsecs;
+ usecs = (usecs/1000)*1000;
timein=time_so_far1();
- while(1)
+ usleep(usecs); /* sleep for big chunk of time */
+
+ while(1) /* now handle the remainder, to get finer control */
{
timeout=time_so_far1();
- /*printf("Sleep for %lld Curtime %g\n",microsecs,timeout-timein);*/
if(timeout-timein > microsecs)
break;
}
-
-/*
- select(0,0,0,0,&nap_time);
-*/
-
-
}
/************************************************************************/
@@ -19666,7 +19935,7 @@ long which;
}
#ifdef DEBUG
#ifdef NO_PRINT_LLD
- if(!silent) printf("\nOffset %lld Size %ld Compute delay %f\n",traj_offset, *traj_size,*delay);
+ if(!silent) printf("\nOffset %ld Size %ld Compute delay %f\n",traj_offset, *traj_size,*delay);
#else
if(!silent) printf("\nOffset %lld Size %lld Compute delay %f\n",traj_offset, *traj_size,*delay);
#endif
@@ -19806,8 +20075,14 @@ r_traj_size()
}
r_traj_fsize=max_offset;
#ifdef DEBUG
+
+#ifdef NO_PRINT_LLD
+ printf("File size of read %ld Item count %ld\n",r_traj_fsize,r_traj_ops);
+#else
printf("File size of read %lld Item count %lld\n",r_traj_fsize,r_traj_ops);
#endif
+
+#endif
fclose(fd);
}
@@ -19898,8 +20173,12 @@ w_traj_size()
}
w_traj_fsize=max_offset;
#ifdef DEBUG
+#ifdef NO_PRINT_LLD
+ printf("File size of write %ld Item count %ld\n",w_traj_fsize,w_traj_ops);
+#else
printf("File size of write %lld Item count %lld\n",w_traj_fsize,w_traj_ops);
#endif
+#endif
fclose(fd);
return(max_offset);
}
@@ -20603,10 +20882,12 @@ int send_size;
sprintf(outbuf.c_dedup_interior,"%d",send_buffer->c_dedup_interior);
sprintf(outbuf.c_dedup_compress,"%d",send_buffer->c_dedup_compress);
sprintf(outbuf.c_dedup_mseed,"%d",send_buffer->c_dedup_mseed);
+ sprintf(outbuf.c_chid_skew,"%d",send_buffer->c_chid_skew);
sprintf(outbuf.c_hist_summary,"%d",send_buffer->c_hist_summary);
sprintf(outbuf.c_op_rate,"%d",send_buffer->c_op_rate);
sprintf(outbuf.c_op_rate_flag,"%d",send_buffer->c_op_rate_flag);
sprintf(outbuf.c_Q_flag,"%d",send_buffer->c_Q_flag);
+ sprintf(outbuf.c_inc_think,"%d",send_buffer->c_inc_think);
sprintf(outbuf.c_L_flag,"%d",send_buffer->c_L_flag);
sprintf(outbuf.c_include_flush,"%d",send_buffer->c_include_flush);
sprintf(outbuf.c_OPS_flag,"%d",send_buffer->c_OPS_flag);
@@ -20626,6 +20907,7 @@ int send_size;
sprintf(outbuf.c_direct_flag,"%d",send_buffer->c_direct_flag);
sprintf(outbuf.c_cpuutilflag,"%d",send_buffer->c_cpuutilflag);
sprintf(outbuf.c_seq_mix,"%d",send_buffer->c_seq_mix);
+ sprintf(outbuf.c_del_flag,"%d",send_buffer->c_del_flag);
sprintf(outbuf.c_client_number,"%d",send_buffer->c_client_number);
sprintf(outbuf.c_command,"%d",send_buffer->c_command);
sprintf(outbuf.c_testnum,"%d",send_buffer->c_testnum);
@@ -21328,7 +21610,7 @@ long long numrecs64, reclen;
struct master_neutral_command *mnc;
char command[512];
struct in_addr my_s_addr;
- char my_port_num[10];
+ char my_port_num[12];
bzero(&cc,sizeof(struct client_command));
@@ -21354,6 +21636,7 @@ long long numrecs64, reclen;
strcat(command,my_port_num);
}
strcat(command," '");
+ usleep(100000); /* Don't spawn rsh too fast... */
junk=system(command);
/*
system("remsh rsnperf '/home/capps/niozone/iozone -+s -t 1 -r 4 -s 8 -+c rsnperf'");
@@ -21439,6 +21722,7 @@ long long numrecs64, reclen;
cc.c_direct_flag = direct_flag;
cc.c_cpuutilflag = cpuutilflag;
cc.c_seq_mix = seq_mix;
+ cc.c_del_flag = del_flag;
cc.c_async_flag = async_flag;
cc.c_k_flag = k_flag;
cc.c_h_flag = h_flag;
@@ -21454,6 +21738,7 @@ long long numrecs64, reclen;
cc.c_dedup_interior = dedup_interior;
cc.c_dedup_compress = dedup_compress;
cc.c_dedup_mseed = dedup_mseed;
+ cc.c_chid_skew = chid_skew;
cc.c_hist_summary = hist_summary;
cc.c_op_rate = op_rate;
cc.c_op_rate_flag = op_rate_flag;
@@ -21472,6 +21757,7 @@ long long numrecs64, reclen;
cc.c_restf = restf;
cc.c_mygen = mygen;
cc.c_Q_flag = Q_flag;
+ cc.c_inc_think = inc_think;
cc.c_L_flag = L_flag;
cc.c_xflag = xflag;
cc.c_w_traj_flag = w_traj_flag;
@@ -21695,6 +21981,7 @@ become_client()
sscanf(cnc->c_direct_flag,"%d",&cc.c_direct_flag);
sscanf(cnc->c_cpuutilflag,"%d",&cc.c_cpuutilflag);
sscanf(cnc->c_seq_mix,"%d",&cc.c_seq_mix);
+ sscanf(cnc->c_del_flag,"%d",&cc.c_del_flag);
sscanf(cnc->c_async_flag,"%d",&cc.c_async_flag);
sscanf(cnc->c_k_flag,"%d",&cc.c_k_flag);
sscanf(cnc->c_h_flag,"%d",&cc.c_h_flag);
@@ -21709,6 +21996,7 @@ become_client()
sscanf(cnc->c_dedup_interior,"%d",&cc.c_dedup_interior);
sscanf(cnc->c_dedup_compress,"%d",&cc.c_dedup_compress);
sscanf(cnc->c_dedup_mseed,"%d",&cc.c_dedup_mseed);
+ sscanf(cnc->c_chid_skew,"%d",&cc.c_chid_skew);
sscanf(cnc->c_hist_summary,"%d",&cc.c_hist_summary);
sscanf(cnc->c_op_rate,"%d",&cc.c_op_rate);
sscanf(cnc->c_op_rate_flag,"%d",&cc.c_op_rate_flag);
@@ -21730,6 +22018,7 @@ become_client()
sscanf(cnc->c_mfflag,"%d",&cc.c_mfflag);
sscanf(cnc->c_unbuffered,"%d",&cc.c_unbuffered);
sscanf(cnc->c_Q_flag,"%d",&cc.c_Q_flag);
+ sscanf(cnc->c_inc_think,"%d",&cc.c_inc_think);
sscanf(cnc->c_L_flag,"%d",&cc.c_L_flag);
sscanf(cnc->c_xflag,"%d",&cc.c_xflag);
sscanf(cnc->c_include_flush,"%d",&cc.c_include_flush);
@@ -21778,6 +22067,7 @@ become_client()
direct_flag = cc.c_direct_flag;
cpuutilflag = cc.c_cpuutilflag;
seq_mix = cc.c_seq_mix;
+ del_flag = cc.c_del_flag;
async_flag = cc.c_async_flag;
k_flag = cc.c_k_flag;
h_flag = cc.c_h_flag;
@@ -21791,6 +22081,7 @@ become_client()
dedup_interior = cc.c_dedup_interior;
dedup_compress = cc.c_dedup_compress;
dedup_mseed = cc.c_dedup_mseed;
+ chid_skew = cc.c_chid_skew;
hist_summary = cc.c_hist_summary;
op_rate = cc.c_op_rate;
op_rate_flag = cc.c_op_rate_flag;
@@ -21813,6 +22104,7 @@ become_client()
restf=cc.c_restf;
mygen=cc.c_mygen;
Q_flag = cc.c_Q_flag;
+ inc_think = cc.c_inc_think;
L_flag = cc.c_L_flag;
xflag = cc.c_xflag;
w_traj_flag = cc.c_w_traj_flag;
@@ -22420,7 +22712,7 @@ get_client_info()
FILE *fd;
char *ret1;
int count;
- char buffer[200];
+ char buffer[800];
count=0;
fd=fopen(client_filename,"r");
if(fd == (FILE *)NULL)
@@ -22436,7 +22728,7 @@ get_client_info()
MAXSTREAMS);
exit(7);
}
- ret1=fgets(buffer,200,fd);
+ ret1=fgets(buffer,800,fd);
if(ret1== (char *)NULL)
break;
count+=parse_client_line(buffer,count);
@@ -22477,7 +22769,7 @@ int line_num;
child_idents[line_num].workdir,
child_idents[line_num].execute_path,
child_idents[line_num].file_name);
- if((num > 0) && (num !=3) && (num !=4))
+ if((num < 0) || ((num > 0) && (num !=3) && (num !=4)))
{
printf("Bad Client Identity at entry %d\n",line_num);
printf("Client: -> %s Workdir: -> %s Execute_path: -> %s \n",
@@ -22921,10 +23213,10 @@ int port,flag;
}
sscanf(mybuf,"%d %f",&count,&throughput);
if(!flag)
- printf("%-20s received %10d Kbytes @ %10.2f Kbytes/sec \n",
+ printf("%-20s received %10d kBytes @ %10.2f kBytes/sec \n",
sp_remote_host,count,throughput);
else
- printf("%-20s sent %10d Kbytes @ %10.2f Kbytes/sec \n",
+ printf("%-20s sent %10d kBytes @ %10.2f kBytes/sec \n",
sp_remote_host,count,throughput);
close(tcfd);
}
@@ -23280,7 +23572,7 @@ sp_do_master_t()
close(sp_msfd);
sp_msfd=0;
sp_get_result(sp_master_results_port,0);
- printf("%-20s sent %10d kbytes @ %10.2f Kbytes/sec \n",
+ printf("%-20s sent %10d kbytes @ %10.2f kBytes/sec \n",
sp_master_host,sp_tcount/1024,
(float)(sp_tcount/1024)/(sp_finish_time-sp_start_time));
@@ -23311,7 +23603,7 @@ sp_do_master_t()
}
sp_finish_time=time_so_far();
sp_get_result(sp_master_results_port,1);
- printf("%-20s received %10d kbytes @ %10.2f Kbytes/sec \n",
+ printf("%-20s received %10d kbytes @ %10.2f kBytes/sec \n",
sp_master_host,sp_tcount/1024,
(float)(sp_tcount/1024)/(sp_finish_time-sp_start_time));
printf("\n");
@@ -23731,10 +24023,10 @@ int
gen_new_buf(char *ibuf, char *obuf, long seed, int size, int percent,
int percent_interior, int percent_compress, int all)
{
- register long *ip, *op; /* Register for speed */
- register long iseed; /* Register for speed */
- register long isize; /* Register for speed */
- register long cseed; /* seed for dedupable for within & ! across */
+ register int *ip, *op; /* Register for speed */
+ register int iseed; /* Register for speed */
+ register int isize; /* Register for speed */
+ register int cseed; /* seed for dedupable for within & ! across */
register int x,w; /* Register for speed */
register int value; /* Register for speed */
register int interior_size; /* size of interior dedup region */
@@ -23750,14 +24042,14 @@ gen_new_buf(char *ibuf, char *obuf, long seed, int size, int percent,
srand(seed+1+(((int)numrecs64)*dedup_mseed)); /* set random seed */
iseed = rand(); /* generate random value */
isize = (size * percent)/100; /* percent that is dedupable */
- interior_size = ((isize * percent_interior)/100);/* /sizeof(long) */
+ interior_size = ((isize * percent_interior)/100);/* /sizeof(int) */
compress_size =((interior_size * percent_compress)/100);
- ip = (long *)ibuf; /* pointer to input buf */
- op = (long *)obuf; /* pointer to output buf */
+ ip = (int *)ibuf; /* pointer to input buf */
+ op = (int *)obuf; /* pointer to output buf */
if(all == 0) /* Special case for verify only */
- isize = sizeof(long);
+ isize = sizeof(int);
/* interior_size = dedup_within + dedup_across */
- for(w=0;w<interior_size;w+=sizeof(long))
+ for(w=0;w<interior_size;w+=sizeof(int))
{
*op=0xdeadbeef+dedup_mseed;
*ip=0xdeadbeef+dedup_mseed;
@@ -23766,18 +24058,18 @@ gen_new_buf(char *ibuf, char *obuf, long seed, int size, int percent,
}
/* Prepare for dedup within but not across */
w=interior_size - compress_size;
- op=(long *)&obuf[w];
- ip=(long *)&ibuf[w];
- srand(chid+1+dedup_mseed); /* set randdom seed */
+ op=(int *)&obuf[w];
+ ip=(int *)&ibuf[w];
+ srand(chid+chid_skew+1+dedup_mseed); /* set randdom seed */
cseed = rand(); /* generate random value */
- for(w=(interior_size-compress_size);w<interior_size;w+=sizeof(long))
+ for(w=(interior_size-compress_size);w<interior_size;w+=sizeof(int))
{
*op=*ip ^ cseed; /* do the xor op */
op++;
ip++;
}
/* isize = dedup across only */
- for(x=interior_size;x<isize;x+=sizeof(long)) /* tight loop for transformation */
+ for(x=interior_size;x<isize;x+=sizeof(int)) /* tight loop for transformation */
{
*op=*ip ^ iseed; /* do the xor op */
op++;
@@ -23788,10 +24080,10 @@ gen_new_buf(char *ibuf, char *obuf, long seed, int size, int percent,
/* make the rest of the buffer non-dedupable */
if(100-percent > 0)
{
- srand(1+seed+((chid+1)*(int)numrecs64)*dedup_mseed);
+ srand(1+seed+((chid+chid_skew+1)*(int)numrecs64)*dedup_mseed);
value=rand();
/* printf("Non-dedup value %x seed %x\n",value,seed);*/
- for( ; x<size;x+=sizeof(long))
+ for( ; x<size;x+=sizeof(int))
*op++=(*ip++)^value; /* randomize the remainder */
}
return(0);
@@ -23804,10 +24096,10 @@ void
touch_dedup(char *i, int size)
{
register int x;
- register long *ip;
- ip = (long *)i;
+ register int *ip;
+ ip = (int *)i;
srand(DEDUPSEED);
- for(x=0;x<size/sizeof(long);x++)
+ for(x=0;x<size/sizeof(int);x++)
{
*ip=rand(); /* fill initial buffer */
ip++;
@@ -24458,7 +24750,13 @@ void * thread_fwrite_test( x)
char *how;
long long Index = 0;
FILE *stream = NULL;
- static int First_Run = 1;
+ int First_Run[MAXSTREAMS];
+ int kk;
+
+ for(kk=0;kk<MAXSTREAMS;kk++)
+ First_Run[kk]=1;
+
+ double burst_acc_time_sec = 0;
if(compute_flag)
delay=compute_time;
@@ -24555,9 +24853,9 @@ void * thread_fwrite_test( x)
purge_buffer_cache();
}
- if(First_Run==1)
+ if(First_Run[xx]==1)
{
- First_Run=0;
+ First_Run[xx]=0;
if(check_filename(filename))
how="r+"; /* file exists, don't create and zero a new one. */
else
@@ -24595,7 +24893,10 @@ void * thread_fwrite_test( x)
else
setvbuf(stream,stdio_buf,_IOFBF,reclen);
- buffer=mainbuffer;
+ if(use_thread)
+ buffer=nbuff;
+ else
+ buffer=mainbuffer;
if(fetchon)
fetchit(buffer,reclen);
if(verify || dedup || dedup_interior)
@@ -24649,7 +24950,7 @@ void * thread_fwrite_test( x)
printf("Unable to open %s\n",tmpname);
exit(40);
}
- fprintf(thread_wqfd,"Offset in Kbytes Latency in microseconds Transfer size in bytes\n");
+ fprintf(thread_wqfd,"Offset in kBytes Latency in microseconds Transfer size in bytes\n");
}
if(L_flag)
{
@@ -24701,8 +25002,14 @@ void * thread_fwrite_test( x)
fd);
#endif
perror("fwrite");
+ exit_code = 74;
signal_handler();
}
+
+#ifndef NO_THREADS
+ count_burst(&burst_acc_time_sec, xx);
+#endif
+
if(hist_summary)
{
thread_qtime_stop=time_so_far();
@@ -24750,8 +25057,11 @@ void * thread_fwrite_test( x)
/*******************************************************************/
if(!stopped){
temp_time = time_so_far();
- child_stat->throughput = ((temp_time - starttime1)-time_res)
- -compute_val;
+ if(inc_think)
+ child_stat->throughput = ((temp_time - starttime1)-time_res - burst_acc_time_sec);
+ else
+ child_stat->throughput = ((temp_time - starttime1)-time_res - burst_acc_time_sec)
+ -compute_val;
if(child_stat->throughput < (double).000001)
{
child_stat->throughput= time_res;
@@ -24791,7 +25101,11 @@ void * thread_fwrite_test( x)
(long long)CHILD_STATE_HOLD);
if (debug1) {
+#ifdef NO_PRINT_LLD
+ printf(" child/slot: %ld, wall-cpu: %8.3f %8.3fC" " -> %6.2f%%\n",
+#else
printf(" child/slot: %lld, wall-cpu: %8.3f %8.3fC" " -> %6.2f%%\n",
+#endif
xx, walltime, cputime,
cpu_util(cputime, walltime));
}
@@ -25028,7 +25342,10 @@ void * thread_fread_test( x)
else
setvbuf(stream,stdio_buf,_IOFBF,reclen);
- buffer=mainbuffer;
+ if(use_thread)
+ buffer=nbuff;
+ else
+ buffer=mainbuffer;
if(fetchon)
fetchit(buffer,reclen);
compute_val=(double)0;
@@ -25080,7 +25397,7 @@ void * thread_fread_test( x)
printf("Unable to open %s\n",tmpname);
exit(40);
}
- fprintf(thread_wqfd,"Offset in Kbytes Latency in microseconds Transfer size in bytes\n");
+ fprintf(thread_wqfd,"Offset in kBytes Latency in microseconds Transfer size in bytes\n");
}
if(L_flag)
{
@@ -25191,8 +25508,11 @@ void * thread_fread_test( x)
if(!stopped){
temp_time = time_so_far();
- child_stat->throughput = ((temp_time - starttime1)-time_res)
- -compute_val;
+ if(inc_think)
+ child_stat->throughput = ((temp_time - starttime1)-time_res);
+ else
+ child_stat->throughput = ((temp_time - starttime1)-time_res)
+ -compute_val;
if(child_stat->throughput < (double).000001)
{
child_stat->throughput= time_res;
@@ -25232,7 +25552,11 @@ void * thread_fread_test( x)
(long long)CHILD_STATE_HOLD);
if (debug1) {
+#ifdef NO_PRINT_LLD
+ printf(" child/slot: %ld, wall-cpu: %8.3f %8.3fC" " -> %6.2f%%\n",
+#else
printf(" child/slot: %lld, wall-cpu: %8.3f %8.3fC" " -> %6.2f%%\n",
+#endif
xx, walltime, cputime,
cpu_util(cputime, walltime));
}
@@ -25295,3 +25619,65 @@ void * thread_fread_test( x)
return(0);
}
+
+static void update_burst_sleep(int fd, long long reclen, double *burst_sleep_time_till_now)
+{
+ if (burst_size_kb_64 == -1 || burst_sleep_duration_msec == -1)
+ return;
+ written_this_burst += reclen;
+ if (written_this_burst >= (burst_size_kb_64 * 1024)) {
+ struct timespec req, rem;
+ int err;
+ double sleep_start_time;
+
+ written_this_burst = 0;
+ rem.tv_sec = burst_sleep_duration_msec/1000;
+ rem.tv_nsec = (burst_sleep_duration_msec%1000)*1000000;
+ fsync(fd);
+ sleep_start_time = time_so_far();
+ do {
+ req = rem;
+ err = nanosleep(&req, &rem);
+ } while ((err == -1) && (errno == EINTR));
+ *burst_sleep_time_till_now += (time_so_far() - sleep_start_time);
+ }
+}
+
+#ifndef NO_THREADS
+static void count_burst(double* burst_acc_time_sec, long long stream_id)
+{
+ double burst_start_time_sec;
+ struct timespec req, rem;
+ int err;
+
+ if (burst_size_per_child == 0 || burst_sleep_duration_msec == -1)
+ return;
+
+ /* Burst mode is handled */
+ burst_written_so_far[stream_id] += reclen;
+
+ /* Need to sleep to empty the burst buffer ? */
+ if (burst_size_per_child <= burst_written_so_far[stream_id])
+ {
+ burst_written_so_far[stream_id] = 0;
+ if (!direct_flag) {
+ fsync(fd);
+ }
+
+ /* Wait for other threads*/
+ burst_start_time_sec = time_so_far();
+ pthread_barrier_wait(barrier);
+
+ /* Sleep to empty the burst buffer*/
+ rem.tv_sec = burst_sleep_duration_msec/1000;
+ rem.tv_nsec = (burst_sleep_duration_msec%1000)*1000000;
+ do {
+ req = rem;
+ err = nanosleep(&req, &rem);
+ } while ((err == -1) && (errno == EINTR));
+
+ *burst_acc_time_sec += time_so_far() - burst_start_time_sec;
+ }
+}
+#endif
+
diff --git a/src/current/iozone_visualizer.pl b/src/current/iozone_visualizer.pl
index 3b3fef0..5d5a52c 100755
--- a/src/current/iozone_visualizer.pl
+++ b/src/current/iozone_visualizer.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
use warnings;
use strict;
@@ -7,6 +7,7 @@ use strict;
#
# Christian Mautner <christian * mautner . ca>, 2005-10-31
# Marc Schoechlin <ms * 256bit.org>, 2007-12-02
+# Pär Karlsson <feinorgh * gmail . com>, 2012-07-24
#
# This script is just a hack :-)
#
@@ -14,9 +15,15 @@ use strict;
# of scripts that come with iozone, but is a complete re-write
#
# The main reason to write this was the need to compare the behaviour of
-# two or more different setups, for tuning filesystems or
+# two or more different setups, for tuning filesystems or
# comparing different pieces of hardware.
#
+# This has been updated (2012) to take the new gnuplot 4 syntax into account,
+# and some general perl cleanups, despite its "hack" status.
+# It also requires some perl libraries to funktion, specifically
+# Readonly and List::MoreUtils which are not included in the standard
+# perl in most distributions.
+#
# This script is in the public domain, too short and too trivial
# to deserve a copyright.
#
@@ -30,8 +37,15 @@ use strict;
# If you don't like png or the graphic size, search for "set terminal" in this file and put whatever gnuplot
# terminal you want. Note I've also noticed that gnuplot switched the set terminal png syntax
# a while back, you might need "set terminal png small size 900,700"
-#
+
+use Carp;
+use English qw(-no_match_vars);
use Getopt::Long;
+use List::MoreUtils qw(any);
+use Readonly;
+
+Readonly my $EMPTY => q{};
+Readonly my $SPACE => q{ };
my $column;
my %columns;
@@ -39,10 +53,11 @@ my $datafile;
my @datafiles;
my $outdir;
my $report;
-my $nooffset=0;
-my @Reports;
+my $nooffset = 0;
+my @reports;
my @split;
-my $size3d; my $size2d;
+my $size3d;
+my $size2d;
# evaluate options
GetOptions(
@@ -51,108 +66,132 @@ GetOptions(
'nooffset' => \$nooffset
);
-$size3d = "900,700" unless defined $size3d;
-$size2d = "800,500" unless defined $size2d;
-
+if ( not defined $size3d ) {
+ $size3d = '1280,960';
+}
+if ( not defined $size2d ) {
+ $size2d = '1024,768';
+}
-my $xoffset = "offset -7";
-my $yoffset = "offset -3";
+my $xoffset = 'offset -7';
+my $yoffset = 'offset -3';
-if ($nooffset == 1){
- $xoffset = ""; $yoffset = "";
+if ( $nooffset == 1 ) {
+ $xoffset = $EMPTY;
+ $yoffset = $EMPTY;
}
-print "\niozone_visualizer.pl : this script is distributed as public domain\n";
-print "Christian Mautner <christian * mautner . ca>, 2005-10-31\n";
-print "Marc Schoechlin <ms * 256bit.org>, 2007-12-02\n";
+print <<"_TEXT_";
+iozone_visualizer.pl : this script is distributed as public domain
+Christian Mautner <christian * mautner . ca>, 2005-10-31
+Marc Schoechlin <ms * 256bit.org>, 2007-12-02
+Pär Karlsson <feinorgh * gmail . com>, 2012-07-24
+_TEXT_
+@reports = @ARGV;
-@Reports=@ARGV;
-
-die "usage: $0 --3d=x,y -2d=x,y <iozone.out> [<iozone2.out>...]\n" if not @Reports or grep (m|^-|, @Reports);
+if ( not @reports or any { m/^-/msx } @reports ) {
+ print "usage: $PROGRAM_NAME --3d=x,y -2d=x,y <iozone.out> [<iozone2.out>...]";
+ exit;
+}
-die "report files must be in current directory" if grep (m|/|, @Reports);
+if ( any { m{/}msx } @reports ) {
+ croak 'report files must be in current directory';
+}
-print "Configured xtics-offset '$xoffset', configured ytics-offfset '$yoffset' (disable with --nooffset)\n";
-print "Size 3d graphs : ".$size3d." (modify with '--3d=x,y')\n";
-print "Size 2d graphs : ".$size2d." (modify with '--2d=x,y')\n";
+print
+"Configured xtics-offset '$xoffset', configured ytics-offset '$yoffset' (disable with --nooffset)\n";
+print 'Size 3d graphs : ' . $size3d . " (modify with '--3d=x,y')\n";
+print 'Size 2d graphs : ' . $size2d . " (modify with '--2d=x,y')\n";
#KB reclen write rewrite read reread read write read rewrite read fwrite frewrite fread freread
-%columns=(
- 'KB' =>1,
- 'reclen' =>2,
- 'write' =>3,
- 'rewrite' =>4,
- 'read' =>5,
- 'reread' =>6,
- 'randread' =>7,
- 'randwrite' =>8,
- 'bkwdread' =>9,
- 'recrewrite'=>10,
- 'strideread'=>11,
- 'fwrite' =>12,
- 'frewrite' =>13,
- 'fread' =>14,
- 'freread' =>15,
- );
+%columns = (
+ 'KB' => 1,
+ 'reclen' => 2,
+ 'write' => 3,
+ 'rewrite' => 4,
+ 'read' => 5,
+ 'reread' => 6,
+ 'randread' => 7,
+ 'randwrite' => 8,
+ 'bkwdread' => 9,
+ 'recrewrite' => 10,
+ 'strideread' => 11,
+ 'fwrite' => 12,
+ 'frewrite' => 13,
+ 'fread' => 14,
+ 'freread' => 15,
+);
#
# create output directory. the name is the concatenation
# of all report file names (minus the file extension, plus
# prefix report_)
#
-$outdir="report_".join("_",map{/([^\.]+)(\..*)?/ && $1}(@Reports));
+$outdir = 'report_' . join q{_}, map { m/([^.]+)([.].*)?/msx && $1 } (@reports);
-print STDERR "Output directory: $outdir ";
+print {*STDERR} "Output directory: $outdir ";
-if ( -d $outdir )
-{
- print STDERR "(removing old directory) ";
+if ( -d $outdir ) {
+ print {*STDERR} '(removing old directory) ';
system "rm -rf $outdir";
}
-mkdir $outdir or die "cannot make directory $outdir";
+mkdir $outdir or croak "cannot make directory $outdir";
-print STDERR "done.\nPreparing data files...";
+print {*STDERR} "done.\nPreparing data files...";
-foreach $report (@Reports)
-{
- open(I, $report) or die "cannot open $report for reading";
- $report=~/^([^\.]+)/;
- $datafile="$1.dat";
+for my $report (@reports) {
+ open my $fhr, '<', $report or croak "cannot open $report for reading";
+ $report =~ m/^([^\.]+)/msx;
+ $datafile = "$1.dat";
push @datafiles, $datafile;
- open(O, ">$outdir/$datafile") or die "cannot open $outdir/$datafile for writing";
- open(O2, ">$outdir/2d-$datafile") or die "cannot open $outdir/$datafile for writing";
+ open my $fho3, '>', "$outdir/$datafile"
+ or croak "cannot open $outdir/$datafile for writing";
+ open my $fho2, '>', "$outdir/2d-$datafile"
+ or croak "cannot open $outdir/$datafile for writing";
my @sorted = sort { $columns{$a} <=> $columns{$b} } keys %columns;
- print O "# ".join(" ",@sorted)."\n";
- print O2 "# ".join(" ",@sorted)."\n";
-
- while(<I>)
- {
- next unless ( /^[\s\d]+$/ );
+ print {$fho3} '# ' . join ($SPACE, @sorted) . "\n";
+ print {$fho2} '# ' . join ($SPACE, @sorted) . "\n";
+
+ my $old_x = 0;
+ while (<$fhr>) {
+ my $line = $_;
+ if ( not $line =~ m/^[\s\d]+$/msx ) {
+ next;
+ }
@split = split();
- next unless ( @split == 15 );
- print O;
- print O2 if $split[1] == 16384 or $split[0] == $split[1];
+ if ( @split != 15 ) {
+ next;
+ }
+ if ( $old_x != $split[0] ) {
+ print {$fho3} "\n";
+ }
+ $old_x = $split[0];
+ print {$fho3} $line;
+ if ( $split[1] == 16384 or $split[0] == $split[1] ) {
+ print {$fho2} $line;
+ }
}
- close(I);
- close(O);
- close(O2);
+ close $fhr or carp $ERRNO;
+ close $fho3 or carp $ERRNO;
+ close $fho2 or carp $ERRNO;
}
-print STDERR "done.\nGenerating graphs:";
-
+print {*STDERR} "done.\nGenerating graphs:";
-open(HTML, ">$outdir/index.html") or die "cannot open $outdir/index.html for writing";
+open my $fhtml, '>', "$outdir/index.html"
+ or carp "cannot open $outdir/index.html for writing";
-print HTML qq{<?xml version="1.0" encoding="iso-8859-1"?>
+print {$fhtml} <<'_HTML_';
+<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>IOZone Statistics</title>
<STYLE type="text/css">
-.headline \{ font-family: Arial, Helvetica, sans-serif; font-size: 18px; color: 003300 ; font-weight: bold; text-decoration: none\}
+.headline { font-family: Arial, Helvetica, sans-serif; font-size: 18px; color: 003300 ; font-weight: bold; text-decoration: none}
</STYLE>
</head>
<body>
@@ -161,103 +200,115 @@ print HTML qq{<?xml version="1.0" encoding="iso-8859-1"?>
<table width="100%" summary="iozone stats">
<tr>
<td>
-};
+_HTML_
# Generate Menu
-print HTML "<u><b>## Overview</b></u>\n<ul>\n";
-foreach $column (keys %columns){
- print HTML '<li><b>'.uc($column).'</b> : '.
- '<a href="#'.$column."\">3d</a>\n".
- '<a href="#s2d-'.$column."\">2d</a></li>\n";
+print {$fhtml} <<'_HTML_';
+<u><b>## Overview</b></u>
+<ul>
+_HTML_
+for my $column ( keys %columns ) {
+ if ( $column =~ m/KB|reclen/msx ) {
+ next;
+ }
+ print {$fhtml} '<li><b>'
+ . uc($column)
+ . '</b> : '
+ . '<a href="#'
+ . $column
+ . "\">3d</a>\n"
+ . '<a href="#s2d-'
+ . $column
+ . "\">2d</a></li>\n";
}
-print HTML "</ul></td></tr>\n";
-# Genereate 3d plots
-foreach $column (keys %columns)
-{
- print STDERR " $column";
-
- open(G, ">$outdir/$column.do") or die "cannot open $outdir/$column.do for writing";
+print {$fhtml} "</ul></td></tr>\n";
+# Generate 3D plots
+for my $column ( keys %columns ) {
+ if ( $column =~ m/KB|reclen/msx ) {
+ next;
+ }
+ print {*STDERR} " $column";
+ open my $fhg, '>', "$outdir/$column.do"
+ or croak "cannot open $outdir/$column.do for writing";
- print G qq{
+ print {$fhg} <<"_GNUPLOT_";
set title "Iozone performance: $column"
set grid lt 2 lw 1
set surface
-set parametric
set xtics $xoffset
set ytics $yoffset
set logscale x 2
set logscale y 2
set autoscale z
-#set xrange [2.**5:2.**24]
-set xlabel "File size in KBytes" -2
-set ylabel "Record size in Kbytes" 2
-set zlabel "Kbytes/sec" 4,8
+set xlabel "File size in Kbytes"
+set ylabel "Record size in Kbytes"
+set zlabel "Kb/s"
set style data lines
set dgrid3d 80,80,3
-#set terminal png small picsize 900 700
set terminal png small size $size3d nocrop
set output "$column.png"
-};
+_GNUPLOT_
- print HTML qq{
+ # original term above:
+ print {$fhtml} <<"_HTML_";
<tr>
<td align="center">
<h2><a name="$column"></a>3d-$column</h2><a href="#top">[top]</a><BR/>
<img src="$column.png" alt="3d-$column"/><BR/>
</td>
</tr>
- };
+_HTML_
- print G "splot ". join(", ", map{qq{"$_" using 1:2:$columns{$column} title "$_"}}(@datafiles));
+ print {$fhg} 'splot ' . join q{, },
+ map { qq{"$_" using 1:2:$columns{$column} title "$_"} } @datafiles;
- print G "\n";
+ print {$fhg} "\n";
- close G;
+ close $fhg or carp $ERRNO;
- open(G, ">$outdir/2d-$column.do") or die "cannot open $outdir/$column.do for writing";
- print G qq{
+ open $fhg, '>', "$outdir/2d-$column.do"
+ or croak "cannot open $outdir/$column.do for writing";
+ print {$fhg} <<"_GNUPLOT_";
set title "Iozone performance: $column"
#set terminal png small picsize 450 350
set terminal png medium size $size2d nocrop
set logscale x
-set xlabel "File size in KBytes"
+set xlabel "File size in Kbytes"
set ylabel "Kbytes/sec"
set output "2d-$column.png"
-};
+_GNUPLOT_
- print HTML qq{
+ print {$fhtml} <<"_HTML_";
<tr>
<td align="center">
<h2><a name="s2d-$column"></a>2d-$column</h2><a href="#top">[top]</a><BR/>
<img src="2d-$column.png" alt="2d-$column"/><BR/>
</td>
</tr>
- };
-
-
+_HTML_
- print G "plot ". join(", ", map{qq{"2d-$_" using 1:$columns{$column} title "$_" with lines}}(@datafiles));
+ print {$fhg} 'plot ' . join q{, },
+ map { qq{"2d-$_" using 1:$columns{$column} title "$_" with lines} }
+ (@datafiles);
- print G "\n";
+ print {$fhg} "\n";
- close G;
+ close $fhg or carp $ERRNO;
- if ( system("cd $outdir && gnuplot $column.do && gnuplot 2d-$column.do") )
- {
- print STDERR "(failed) ";
+ if ( system "cd $outdir && gnuplot $column.do && gnuplot 2d-$column.do" ) {
+ print {*STDERR} '(failed) ';
}
- else
- {
- print STDERR "(ok) ";
+ else {
+ print {*STDERR} '(ok) ';
}
}
-print HTML qq{
+print {$fhtml} <<'_HTML_';
</table>
</body>
</html>
-};
-print STDERR "done.\n";
+_HTML_
+print {*STDERR} "done.\n";
diff --git a/src/current/libasync.c b/src/current/libasync.c
index adb14a6..663b9d0 100644
--- a/src/current/libasync.c
+++ b/src/current/libasync.c
@@ -96,7 +96,7 @@
#include <sys/types.h>
#include <aio.h>
-#if defined(solaris) || defined(linux) || defined(SCO_Unixware_gcc)
+#if defined(solaris) || defined(linux) || defined(SCO_Unixware_gcc) || defined(__NetBSD__)
#else
#include <sys/timers.h>
#endif
@@ -119,7 +119,7 @@
#include <stdlib.h>
#endif
-#if (defined(solaris) && defined(__LP64__)) || defined(__s390x__) || defined(FreeBSD)
+#if (defined(solaris) && defined(__LP64__)) || defined(__s390x__) || defined(FreeBSD) || defined(__NetBSD__)
/* If we are building for 64-bit Solaris, all functions that return pointers
* must be declared before they are used; otherwise the compiler will assume
* that they return ints and the top 32 bits of the pointer will be lost,
@@ -150,7 +150,7 @@ extern int one;
* cache, pointed to by async_init(gc) will be of
* this structure type.
*/
-char version[] = "Libasync Version $Revision: 3.24 $";
+char version[] = "Libasync Version $Revision: 3.25 $";
struct cache_ent {
struct aiocb myaiocb; /* For use in small file mode */
#ifdef _LARGEFILE64_SOURCE
diff --git a/src/current/libbif.c b/src/current/libbif.c
index ee2cf24..0f40a36 100644
--- a/src/current/libbif.c
+++ b/src/current/libbif.c
@@ -23,11 +23,11 @@
#include <sys/fcntl.h>
#endif
-#if defined(OSV5) || defined(linux) || defined (__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__)
+#if defined(OSV5) || defined(linux) || defined (__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__) || defined(__NetBSD__)
#include <string.h>
#endif
-#if defined(linux) || defined(__DragonFly__) || defined(macosx)
+#if defined(linux) || defined(__DragonFly__) || defined(IOZ_macosx) || defined(__NetBSD__)
#include <unistd.h>
#include <stdlib.h>
#endif
@@ -91,7 +91,7 @@ void do_label(int,char *,int,int);
/* column */
/************************************************************************/
-char libbif_version[] = "Libbif Version $Revision: 3.25 $";
+char libbif_version[] = "Libbif Version $Revision: 3.27 $";
void do_eof(int ); /* Used internally */
void do_header(int ); /* Used internally */
int endian(void);
diff --git a/src/current/makefile b/src/current/makefile
index eb1fbec..1e750a9 100644
--- a/src/current/makefile
+++ b/src/current/makefile
@@ -1,5 +1,5 @@
#
-# Version $Revision: 1.141 $
+# Version $Revision: 1.146 $
#
# The makefile for building all versions of iozone for all supported
# platforms
@@ -57,6 +57,7 @@ all:
@echo " -> linux-sparc (32bit) <-"
@echo " -> macosx (32bit) <-"
@echo " -> netbsd (32bit) <-"
+ @echo " -> netbsd-AMD64 (64bit) <-"
@echo " -> openbsd (32bit) <-"
@echo " -> openbsd-threads (32bit) <-"
@echo " -> OSFV3 (64bit) <-"
@@ -207,7 +208,7 @@ linux-powerpc64: iozone_linux-powerpc64.o libbif.o libasync.o fileop_linux-ppc6
-lrt $(FLAG64BIT) -o iozone
$(CC) -O3 -Dlinux fileop_linux-ppc64.o $(FLAG64BIT) -o fileop
$(CC) -O3 -Dlinux pit_server-linux-powerpc64.o $(FLAG64BIT) -o pit_server
-
+
#
# GNU 'C' compiler Linux build with threads, largefiles, async I/O
#
@@ -587,15 +588,27 @@ SCO_Unixware_gcc: iozone_SCO_Unixware_gcc.o libbif.o libasync.o
-lsocket -lthread -o iozone
#
-# GNU C compiler NetBSD build with no threads, no largefiles, no async I/O
+# GNU C compiler NetBSD build with threads, no largefiles, no async I/O
#
-netbsd: iozone_netbsd.o libbif.o fileop_netbsd.o pit_server.o
- $(CC) -O $(LDFLAGS) iozone_netbsd.o libbif.o -o iozone
+netbsd: iozone_netbsd.o libbif.o libasync.o fileop_netbsd.o pit_server.o
+ $(CC) -O $(LDFLAGS) iozone_netbsd.o libbif.o libasync.o \
+ -lrt -lpthread -o iozone
$(CC) -O fileop_netbsd.o -o fileop
$(CC) -O pit_server.o -o pit_server
#
+# GNU C compiler NetBSD/amd64 build with threads, no largefiles, async I/O
+#
+netbsd-AMD64: iozone_netbsd-AMD64.o libbif.o libasync.o fileop_netbsd-AMD64.o pit_server.o
+ $(CC) -O $(LDFLAGS) iozone_netbsd-AMD64.o libbif.o libasync.o \
+ -lrt -lpthread -o iozone
+ $(CC) -O fileop_netbsd-AMD64.o -o fileop
+ $(CC) -O pit_server.o -o pit_server
+
+#
+
+#
#
# Now for the machine specific stuff
#
@@ -655,7 +668,7 @@ pit_server_solaris10gcc-64.o: pit_server.c
@echo ""
@echo "Building the pit_server"
@echo ""
- $(CC) -c $(CFLAGS) $(S10GCCFLAGS) pit_server.c -o pit_server_solaris10gcc-64.o
+ $(GCC) -c $(CFLAGS) $(S10GCCFLAGS) pit_server.c -o pit_server_solaris10gcc-64.o
pit_server.o: pit_server.c
@echo ""
@@ -778,7 +791,6 @@ iozone_linux-powerpc64.o: iozone.c libbif.c libasync.c
$(CC) -c -O3 -Dunix -Dlinux -DHAVE_ANSIC_C -DASYNC_IO \
-D_LARGEFILE64_SOURCE $(CFLAGS) libasync.c $(FLAG64BIT) -o libasync.o
-
iozone_linux-sparc.o: iozone.c libbif.c libasync.c
@echo ""
@echo "Building iozone for Linux Sparc"
@@ -839,12 +851,24 @@ fileop_freebsd.o: fileop.c
@echo ""
$(CC) -c -O $(CFLAGS) fileop.c -o fileop_freebsd.o
+fileop_dragonfly.o: fileop.c
+ @echo ""
+ @echo "Building fileop for DragonFly"
+ @echo ""
+ $(CC) -c -O $(CFLAGS) fileop.c -o fileop_dragonfly.o
+
fileop_netbsd.o: fileop.c
@echo ""
@echo "Building fileop for NetBSD"
@echo ""
$(CC) -c -O $(CFLAGS) fileop.c -o fileop_netbsd.o
+fileop_netbsd-AMD64.o: fileop.c
+ @echo ""
+ @echo "Building fileop for NetBSD/AMD64"
+ @echo ""
+ $(CC) -Wall -c -O $(CFLAGS) fileop.c -o fileop_netbsd-AMD64.o
+
fileop_Solaris.o: fileop.c
@echo ""
@echo "Building fileop for Solaris"
@@ -899,7 +923,7 @@ fileop_macosx.o: fileop.c
@echo ""
@echo "Building fileop for MAC OS X"
@echo ""
- $(CC) -Wall -c -O -Dmacosx $(CFLAGS) fileop.c -o fileop_macosx.o
+ $(CC) -Wall -c -O -DIOZ_macosx $(CFLAGS) fileop.c -o fileop_macosx.o
fileop_linux-ia64.o: fileop.c
@echo ""
@@ -1358,9 +1382,9 @@ iozone_macosx.o: iozone.c libbif.c
@echo ""
@echo "Build iozone for MacOSX"
@echo ""
- $(CC) -c -O -Dunix -Dbsd4_2 -Dmacosx -DHAVE_ANSIC_C -DNO_THREADS \
+ $(CC) -c -O -Dunix -Dbsd4_2 -DIOZ_macosx -DHAVE_ANSIC_C -DNO_THREADS \
-DNAME='"macosx"' -DSHARED_MEM $(CFLAGS) iozone.c -o iozone_macosx.o
- $(CC) -c -O -Dunix -Dbsd4_2 -Dmacosx -DHAVE_ANSIC_C -DNO_THREADS \
+ $(CC) -c -O -Dunix -Dbsd4_2 -DIOZ_macosx -DHAVE_ANSIC_C -DNO_THREADS \
-DSHARED_MEM $(CFLAGS) libbif.c -o libbif.o
iozone_openbsd.o: iozone.c libbif.c
@@ -1455,7 +1479,25 @@ iozone_netbsd.o: iozone.c libbif.c
@echo ""
@echo "Building iozone NetBSD "
@echo ""
- $(CC) -c -O -Dunix -Dbsd4_4 -DHAVE_ANSIC_C -DNO_THREADS \
- -DNAME='"netbsd"' -DSHARED_MEM $(CFLAGS) iozone.c -o iozone_netbsd.o
+
+ $(CC) -c -O -Dunix -DHAVE_ANSIC_C -DASYNC_IO -DNAME='"netbsd"' \
+ -DSHARED_MEM \
+ -DHAVE_PREAD $(CFLAGS) iozone.c -o iozone_netbsd.o
+ $(CC) -c -O -Dunix -DHAVE_ANSIC_C -DASYNC_IO \
+ -DSHARED_MEM $(CFLAGS) libbif.c -o libbif.o
+ $(CC) -c -O -Dunix -DHAVE_ANSIC_C -DASYNC_IO \
+ $(CFLAGS) libasync.c -o libasync.o
+
+iozone_netbsd-AMD64.o: iozone.c libbif.c libasync.c
+ @echo ""
+ @echo "Building iozone for NetBSD/amd64"
+ @echo ""
+ $(CC) -c -O -Dunix -DHAVE_ANSIC_C -DASYNC_IO -DNAME='"netbsd-AMD64"' \
+ -D__AMD64__ -DSHARED_MEM \
+ -DHAVE_PREAD $(CFLAGS) iozone.c -o iozone_netbsd-AMD64.o
+ $(CC) -c -O -Dunix -DHAVE_ANSIC_C -DASYNC_IO \
+ -DSHARED_MEM $(CFLAGS) libbif.c -o libbif.o
+ $(CC) -c -O -Dunix -DHAVE_ANSIC_C -DASYNC_IO \
+ $(CFLAGS) libasync.c -o libasync.o
$(CC) -c -O -Dunix -Dbsd4_4 -DHAVE_ANSIC_C -DNO_THREADS \
-DSHARED_MEM $(CFLAGS) libbif.c -o libbif.o
diff --git a/src/current/report.pl b/src/current/report.pl
index ece8cf8..3b21055 100755
--- a/src/current/report.pl
+++ b/src/current/report.pl
@@ -104,7 +104,7 @@ set logscale x 2
set logscale y 2
set autoscale z
#set xrange [2.**5:2.**24]
-set xlabel "File size in KBytes"
+set xlabel "File size in Kbytes"
set ylabel "Record size in Kbytes"
set zlabel "Kbytes/sec"
set style data lines
@@ -126,7 +126,7 @@ set title "Iozone performance: $column"
#set terminal png small picsize 450 350
set terminal png small size 450 350
set logscale x
-set xlabel "File size in KBytes"
+set xlabel "File size in Kbytes"
set ylabel "Kbytes/sec"
set output "2d-$column.png"
};
diff --git a/src/current/spec.in b/src/current/spec.in
index b385b58..5b4c501 100644
--- a/src/current/spec.in
+++ b/src/current/spec.in
@@ -1,7 +1,7 @@
Summary: Iozone Filesystem Benchmark
Name: iozone
Version: 3
-Release: 398
+Release: 434
License: Freeware
Group: Applications/Engineering
Source: %{name}%{version}_%{release}.tar
@@ -25,7 +25,7 @@ fread, fwrite, random read, pread ,mmap, aio_read, aio_write.
##
## SETUP and PATCH
##
-%setup -n iozone3_398/src/current
+%setup -n iozone3_434/src/current
##
@@ -75,22 +75,22 @@ fread, fwrite, random read, pread ,mmap, aio_read, aio_write.
##
%install
mkdir -p $RPM_BUILD_ROOT/opt/iozone/bin
-cp $RPM_BUILD_DIR/iozone3_398/src/current/iozone $RPM_BUILD_ROOT/opt/iozone/bin/
-cp $RPM_BUILD_DIR/iozone3_398/src/current/fileop $RPM_BUILD_ROOT/opt/iozone/bin/
-cp $RPM_BUILD_DIR/iozone3_398/src/current/pit_server $RPM_BUILD_ROOT/opt/iozone/bin/
-cp $RPM_BUILD_DIR/iozone3_398/src/current/Generate_Graphs $RPM_BUILD_ROOT/opt/iozone/bin/
-cp $RPM_BUILD_DIR/iozone3_398/src/current/gengnuplot.sh $RPM_BUILD_ROOT/opt/iozone/bin/
-cp $RPM_BUILD_DIR/iozone3_398/src/current/gnu3d.dem $RPM_BUILD_ROOT/opt/iozone/bin/
+cp $RPM_BUILD_DIR/iozone3_434/src/current/iozone $RPM_BUILD_ROOT/opt/iozone/bin/
+cp $RPM_BUILD_DIR/iozone3_434/src/current/fileop $RPM_BUILD_ROOT/opt/iozone/bin/
+cp $RPM_BUILD_DIR/iozone3_434/src/current/pit_server $RPM_BUILD_ROOT/opt/iozone/bin/
+cp $RPM_BUILD_DIR/iozone3_434/src/current/Generate_Graphs $RPM_BUILD_ROOT/opt/iozone/bin/
+cp $RPM_BUILD_DIR/iozone3_434/src/current/gengnuplot.sh $RPM_BUILD_ROOT/opt/iozone/bin/
+cp $RPM_BUILD_DIR/iozone3_434/src/current/gnu3d.dem $RPM_BUILD_ROOT/opt/iozone/bin/
mkdir -p $RPM_BUILD_ROOT/opt/iozone/docs
-cp $RPM_BUILD_DIR/iozone3_398/docs/IOzone_msword_98.pdf $RPM_BUILD_ROOT/opt/iozone/docs/
-cp $RPM_BUILD_DIR/iozone3_398/docs/Run_rules.doc $RPM_BUILD_ROOT/opt/iozone/docs/
-cp $RPM_BUILD_DIR/iozone3_398/docs/IOzone_msword_98.doc $RPM_BUILD_ROOT/opt/iozone/docs/
-cp $RPM_BUILD_DIR/iozone3_398/docs/Iozone_ps.gz $RPM_BUILD_ROOT/opt/iozone/docs/
-cp $RPM_BUILD_DIR/iozone3_398/src/current/Gnuplot.txt $RPM_BUILD_ROOT/opt/iozone/docs/
+cp $RPM_BUILD_DIR/iozone3_434/docs/IOzone_msword_98.pdf $RPM_BUILD_ROOT/opt/iozone/docs/
+cp $RPM_BUILD_DIR/iozone3_434/docs/Run_rules.doc $RPM_BUILD_ROOT/opt/iozone/docs/
+cp $RPM_BUILD_DIR/iozone3_434/docs/IOzone_msword_98.doc $RPM_BUILD_ROOT/opt/iozone/docs/
+cp $RPM_BUILD_DIR/iozone3_434/docs/Iozone_ps.gz $RPM_BUILD_ROOT/opt/iozone/docs/
+cp $RPM_BUILD_DIR/iozone3_434/src/current/Gnuplot.txt $RPM_BUILD_ROOT/opt/iozone/docs/
mkdir -p $RPM_BUILD_ROOT/opt/iozone/man/man1
-cp $RPM_BUILD_DIR/iozone3_398/docs/iozone.1 $RPM_BUILD_ROOT/opt/iozone/man/man1/
+cp $RPM_BUILD_DIR/iozone3_434/docs/iozone.1 $RPM_BUILD_ROOT/opt/iozone/man/man1/
##