Recent changes (master)
The following changes since commit c5dd6d8975fc36da778d08c21d3e051add6d3030:
net: use SIGTERM for terminate (2014-10-08 14:14:05 -0600)
are available in the git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to 3441a52d588b95267f31491d4dca5f1418b1dcf5:
engines/libaio: better protect against a busy loop in getevents() (2014-10-09 20:14:27 -0600)
----------------------------------------------------------------
Andrey Kuzmin (1):
engines/libaio: better protect against a busy loop in getevents()
Jens Axboe (12):
net: fix error reported on job exit and full residual engines/net: add socket buffer window size setting engines/net: add TCP_MAXSEG setting (mss)
engines/net: add start of tracking how many UDP packages are dropped
stat: add dropped ios to the standard output engines/net: turn off UDP package dropping if buf size doesn't match
eta: don't count TD_SETTING_UP as a running process engines/net: use link close message on TCP as well
configure: only print gtk status if --enable-gfio used engines/net: add subjob number to given port
Update documentation on net engine port usage
stat: add total/short/drop ios to the json output
HOWTO | 9 ++- client.c | 1 + configure | 56 ++++++++++++++-- engines/libaio.c | 4 +- engines/net.c | 196 +++++++++++++++++++++++++++++++++++++++++++++++++----- eta.c | 5 +- fio.1 | 10 ++- server.c | 1 + stat.c | 18 +++-- stat.h | 1 + 10 files changed, 268 insertions(+), 33 deletions(-)
---
Diff of recent changes:
HOWTO +8 -1
@@ -1640,7 +1640,9 @@ that defines them is selected. address. [netsplice] port=int -[net] port=int The TCP or UDP port to bind to or connect to. +[net] port=int The TCP or UDP port to bind to or connect to. If this is used +with numjobs to spawn multiple instances of the same job type, then this will +be the starting port number since fio will use a range of ports. [netsplice] interface=str [net] interface=str The IP address of the network interface used to send or
@@ -1672,6 +1674,7 @@ that defines them is selected. [net] listen For TCP network connections, tell fio to listen for incoming connections rather than initiating an outgoing connection. The hostname must be omitted if this option is used. + [net] pingpong Normaly a network writer will just continue writing data, and a network reader will just consume packages. If pingpong=1 is set, a writer will send its normal payload to the reader,
@@ -1684,6 +1687,10 @@ that defines them is selected. single reader when multiple readers are listening to the same address. +[net] window_size Set the desired socket buffer size for the connection. + +[net] mss Set the TCP maximum segment size (TCP_MAXSEG). + [e4defrag] donorname=str File will be used as a block donor(swap extents between files) [e4defrag] inplace=int
client.c +1 -0
@@ -831,6 +831,7 @@ static void convert_ts(struct thread_stat *dst, struct thread_stat *src)for (i =0 ; i <DDIR_RWDIR_CNT ; i++) { dst->total_io_u[i] =le64_to_cpu (src->total_io_u[i]); dst->short_io_u[i] =le64_to_cpu (src->short_io_u[i]); + dst->drop_io_u[i] =le64_to_cpu (src->drop_io_u[i]); } dst->total_submit =le64_to_cpu (src->total_submit);
configure +52 -4
92 lines not on this page · raw message
engines/libaio.c +2 -2
@@ -165,9 +165,9 @@ static int fio_libaio_getevents(struct thread_data *td, unsigned int min, r =io_getevents (ld->aio_ctx, actual_min, max, ld->aio_events + events, lt); } -if (r >=0 ) +if (r >0 ) events += r; -else if (r == -EAGAIN ) { +else if ((min && r ==0 ) || r == -EAGAIN ) {fio_libaio_commit (td);usleep (100 ); }else if (r != -EINTR )
engines/net.c +179 -17
343 lines not on this page · raw message
eta.c +2 -3
@@ -392,10 +392,9 @@ int calc_thread_status(struct jobs_eta *je, int force) }else if (td->runstate ==TD_RAMP ) { je->nr_running++; je->nr_ramp++; - }else if (td->runstate ==TD_SETTING_UP ) { - je->nr_running++; + }else if (td->runstate ==TD_SETTING_UP ) je->nr_setting_up++; - }else if (td->runstate <TD_RUNNING ) +else if (td->runstate <TD_RUNNING ) je->nr_pending++;if (je->elapsed_sec >=3 )
fio.1 +9 -1
@@ -1471,7 +1471,9 @@ If the job is a TCP listener or UDP reader, the hostname is not used and must be omitted unless it is a valid UDP multicast address. .TP .BI (net,netsplice)port \fR=\fPint -The TCP or UDP port to bind to or connect to. +The TCP or UDP port to bind to or connect to. If this is used with +\fBnumjobs\fR to spawn multiple instances of the same job type, then +this will be the starting port number since fio will use a range of ports. .TP .BI (net,netsplice)interface \fR=\fPstr The IP address of the network interface used to send or receive UDP multicast
@@ -1525,6 +1527,12 @@ completion latency measures how long it took for the other end to receive and send back. For UDP multicast traffic pingpong=1 should only be set for a single reader when multiple readers are listening to the same address. .TP +.BI (net, window_size) \fR=\fPint +Set the desired socket buffer size for the connection. +.TP +.BI (net, mss) \fR=\fPint +Set the TCP maximum segment size (TCP_MAXSEG). +.TP .BI (e4defrag,donorname) \fR=\fPstr File will be used as a block donor (swap extents between files) .TP
server.c +1 -0
@@ -1066,6 +1066,7 @@ void fio_server_send_ts(struct thread_stat *ts, struct group_run_stats *rs)for (i =0 ; i <DDIR_RWDIR_CNT ; i++) { p.ts.total_io_u[i] =cpu_to_le64 (ts->total_io_u[i]); p.ts.short_io_u[i] =cpu_to_le64 (ts->short_io_u[i]); + p.ts.drop_io_u[i] =cpu_to_le64 (ts->drop_io_u[i]); } p.ts.total_submit =cpu_to_le64 (ts->total_submit);
stat.c +13 -5
@@ -506,9 +506,7 @@ static void show_thread_status_normal(struct thread_stat *ts,time_t time_p;char time_buf[64 ]; -if (!(ts->io_bytes[DDIR_READ ] + ts->io_bytes[DDIR_WRITE ] + - ts->io_bytes[DDIR_TRIM ]) && !(ts->total_io_u[DDIR_READ ] + - ts->total_io_u[DDIR_WRITE ] + ts->total_io_u[DDIR_TRIM ])) +if (!ddir_rw_sum (ts->io_bytes) && !ddir_rw_sum (ts->total_io_u))return ;time (&time_p);
@@ -574,13 +572,17 @@ static void show_thread_status_normal(struct thread_stat *ts, io_u_dist[3 ], io_u_dist[4 ], io_u_dist[5], io_u_dist[6]);log_info (" issued : total=r=%llu/w=%llu/d=%llu," -" short=r=%llu/w=%llu/d=%llu\n" , +" short=r=%llu/w=%llu/d=%llu," +" drop=r=%llu/w=%llu/d=%llu\n" , (unsigned long long ) ts->total_io_u[0 ], (unsigned long long ) ts->total_io_u[1 ], (unsigned long long ) ts->total_io_u[2 ], (unsigned long long ) ts->short_io_u[0 ], (unsigned long long ) ts->short_io_u[1 ], - (unsigned long long ) ts->short_io_u[2 ]); + (unsigned long long ) ts->short_io_u[2 ], + (unsigned long long ) ts->drop_io_u[0 ], + (unsigned long long ) ts->drop_io_u[1 ], + (unsigned long long ) ts->drop_io_u[2 ]);if (ts->continue_on_error) { log_info(" errors : total=%llu, first_error=%d/<%s>\n", (unsigned long long)ts->total_err_count,
@@ -703,6 +705,9 @@ static void add_ddir_status_json(struct thread_stat *ts,json_object_add_value_int (dir_object,"bw" , bw);json_object_add_value_int (dir_object,"iops" , iops);json_object_add_value_int (dir_object,"runtime" , ts->runtime[ddir]); +json_object_add_value_int (dir_object,"total_ios" , ts->total_io_u[ddir]); +json_object_add_value_int (dir_object,"short_ios" , ts->short_io_u[ddir]); +json_object_add_value_int (dir_object,"drop_ios" , ts->drop_io_u[ddir]);if (!calc_lat (&ts->slat_stat[ddir], &min, &max, &mean, &dev)) { min = max =0 ;
@@ -1123,9 +1128,11 @@ void sum_thread_stats(struct thread_stat *dst, struct thread_stat *src, int nr)if (!dst->unified_rw_rep) { dst->total_io_u[k] += src->total_io_u[k]; dst->short_io_u[k] += src->short_io_u[k]; + dst->drop_io_u[k] += src->drop_io_u[k]; }else { dst->total_io_u[0 ] += src->total_io_u[k]; dst->short_io_u[0 ] += src->short_io_u[k]; + dst->drop_io_u[0 ] += src->drop_io_u[k]; } }
@@ -1658,6 +1665,7 @@ void reset_io_stats(struct thread_data *td)for (i =0 ; i <3 ; i++) { ts->total_io_u[i] =0 ; ts->short_io_u[i] =0 ; + ts->drop_io_u[i] =0 ; } }
stat.h +1 -0
@@ -160,6 +160,7 @@ struct thread_stat {uint32_t io_u_plat[DDIR_RWDIR_CNT ][FIO_IO_U_PLAT_NR ];uint64_t total_io_u[3 ];uint64_t short_io_u[3 ]; +uint64_t drop_io_u[3 ];uint64_t total_submit;uint64_t total_complete;