Displaying 9 results from an estimated 9 matches for "stats_trim".
2019 Nov 30
0
[PATCH nbdkit v2 3/3] filters: stats: Add flush stats
..., st->usecs));
+
+ fprintf (fp, "\n");
+ }
}
static inline void
@@ -117,6 +124,7 @@ print_stats (int64_t usecs)
print_stat (&zero_st);
print_stat (&extents_st);
print_stat (&cache_st);
+ print_stat (&flush_st);
fflush (fp);
}
@@ -263,6 +271,21 @@ stats_trim (struct nbdkit_next_ops *next_ops, void *nxdata,
return r;
}
+/* Flush. */
+static int
+stats_flush (struct nbdkit_next_ops *next_ops, void *nxdata,
+ void *handle, uint32_t flags,
+ int *err)
+{
+ struct timeval start;
+ int r;
+
+ gettimeofday (&start, NULL);...
2019 Nov 30
4
[PATCH nbdkit v2 0/3] filters: stats: More useful, more friendly
- Use more friendly output with GiB and MiB/s
- Measure time per operation, providing finer grain stats
- Add total stats for understanding system throughput
- Add missing stats for flush
I hope that these changes will help to understand and improve virt-v2v
performance.
Changes since v1:
- Keep bytes values
- Increase precision to 0.001 GiB and 0.001 MiB/s
- Add total stats
- Show time before
2019 Nov 30
5
[PATCH nbdkit 0/3] filters: stats: More useful, more friendly
- Use more friendly output with GiB and MiB/s.
- Measure time per operation, providing finer grain stats
- Add missing stats for flush
I hope that these changes will help to understand and imporve virt-v2v
performance.
Nir Soffer (3):
filters: stats: Show size in GiB, rate in MiB/s
filters: stats: Measure time per operation
filters: stats: Add flush stats
filters/stats/stats.c | 117
2019 Nov 30
0
[PATCH nbdkit v2 2/3] filters: stats: Measure time per operation
...{
+ struct timeval start;
int r;
+ gettimeofday (&start, NULL);
r = next_ops->pwrite (nxdata, buf, count, offset, flags, err);
- if (r == 0) record_stat (&pwrite_st, count);
+ if (r == 0) record_stat (&pwrite_st, count, &start);
return r;
}
@@ -228,10 +254,12 @@ stats_trim (struct nbdkit_next_ops *next_ops, void *nxdata,
uint32_t count, uint64_t offset, uint32_t flags,
int *err)
{
+ struct timeval start;
int r;
+ gettimeofday (&start, NULL);
r = next_ops->trim (nxdata, count, offset, flags, err);
- if (r == 0) record_stat...
2019 Nov 30
0
[PATCH nbdkit 2/3] filters: stats: Measure time per operation
..., count, offset, flags, err);
if (r == 0) {
+ gettimeofday (&end, NULL);
+ usecs = tvdiff_usec(&start, &end);
+
ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lock);
pwrite_ops++;
pwrite_bytes += count;
+ pwrite_usecs += usecs;
}
return r;
}
@@ -222,13 +236,20 @@ stats_trim (struct nbdkit_next_ops *next_ops, void *nxdata,
uint32_t count, uint64_t offset, uint32_t flags,
int *err)
{
+ struct timeval start, end;
+ int64_t usecs;
int r;
+ gettimeofday (&start, NULL);
r = next_ops->trim (nxdata, count, offset, flags, err);
i...
2019 Apr 24
0
[nbdkit PATCH 4/4] filters: Check for mutex failures
...r = next_ops->pwrite (nxdata, buf, count, offset, flags, err);
if (r == 0) {
- pthread_mutex_lock (&lock);
+ ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lock);
pwrite_ops++;
pwrite_bytes += count;
- pthread_mutex_unlock (&lock);
}
return r;
}
@@ -201,10 +198,9 @@ stats_trim (struct nbdkit_next_ops *next_ops, void *nxdata,
r = next_ops->trim (nxdata, count, offset, flags, err);
if (r == 0) {
- pthread_mutex_lock (&lock);
+ ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lock);
trim_ops++;
trim_bytes += count;
- pthread_mutex_unlock (&lock);...
2019 Apr 24
7
[nbdkit PATCH 0/4] More mutex sanity checking
I do have a question about whether patch 2 is right, or whether I've
exposed a bigger problem in the truncate (and possibly other) filter,
but the rest seem fairly straightforward.
Eric Blake (4):
server: Check for pthread lock failures
truncate: Factor out reading real_size under mutex
plugins: Check for mutex failures
filters: Check for mutex failures
filters/cache/cache.c
2020 Feb 25
6
[PATCH nbdkit 0/5] server: Add .get_ready callback.
I like this change. I think we were overloading the config_complete
method before to do two different things (complete configuration; do
any allocation/housekeeping necessary before we can start serving).
The only questions in my mind are whether we want this before 1.18,
and whether the name ("get_ready") is a good one.
Rich.
2019 May 16
27
[nbdkit PATCH v2 00/24] implement NBD_CMD_CACHE
Since v1:
- rework .can_cache to be tri-state, with default of no advertisement
(ripple effect through other patches)
- add a lot more patches in order to round out filter support
And in the meantime, Rich pushed NBD_CMD_CACHE support into libnbd, so
in theory we now have a way to test cache commands through the entire
stack.
Eric Blake (24):
server: Internal hooks for implementing