* Increasing startup time @ 2015-11-06 3:08 Matthew Eaton 2015-11-08 0:29 ` Jens Axboe 0 siblings, 1 reply; 5+ messages in thread From: Matthew Eaton @ 2015-11-06 3:08 UTC (permalink / raw) To: fio I noticed during testing recent fio releases it seemed bit laggy to start, so I tried some tests and it seems fio has been increasingly taking longer to start for some reason. Don't know if this is expected or if something is wrong? These are some tests I ran on a few different release versions... matt@matt-desktop:~$ time fio-2.2.3/fio -v fio-2.2.3 real 0m0.008s user 0m0.004s sys 0m0.004s matt@matt-desktop:~$ time fio-2.2.3/fio -v fio-2.2.3 real 0m0.009s user 0m0.009s sys 0m0.000s matt@matt-desktop:~$ time fio-2.2.4/fio -v fio-2.2.4 real 0m0.009s user 0m0.000s sys 0m0.008s matt@matt-desktop:~$ time fio-2.2.4/fio -v fio-2.2.4 real 0m0.009s user 0m0.009s sys 0m0.000s matt@matt-desktop:~$ time fio-2.2.5/fio -v fio-2.2.5 real 0m0.015s user 0m0.011s sys 0m0.004s matt@matt-desktop:~$ time fio-2.2.5/fio -v fio-2.2.5 real 0m0.014s user 0m0.003s sys 0m0.010s matt@matt-desktop:~$ time fio-2.2.6/fio -v fio-2.2.6 real 0m0.015s user 0m0.004s sys 0m0.011s matt@matt-desktop:~$ time fio-2.2.6/fio -v fio-2.2.6 real 0m0.015s user 0m0.000s sys 0m0.015s matt@matt-desktop:~$ time fio-2.2.7/fio -v fio-2.2.7 real 0m0.083s user 0m0.015s sys 0m0.066s matt@matt-desktop:~$ time fio-2.2.7/fio -v fio-2.2.7 real 0m0.081s user 0m0.013s sys 0m0.067s matt@matt-desktop:~$ time fio-2.2.11/fio -v fio-2.2.11 real 0m0.079s user 0m0.020s sys 0m0.059s matt@matt-desktop:~$ time fio-2.2.11/fio -v fio-2.2.11 real 0m0.079s user 0m0.000s sys 0m0.078s ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Increasing startup time 2015-11-06 3:08 Increasing startup time Matthew Eaton @ 2015-11-08 0:29 ` Jens Axboe 2015-11-08 0:34 ` Jens Axboe 0 siblings, 1 reply; 5+ messages in thread From: Jens Axboe @ 2015-11-08 0:29 UTC (permalink / raw) To: Matthew Eaton; +Cc: fio On Thu, Nov 05 2015, Matthew Eaton wrote: > I noticed during testing recent fio releases it seemed bit laggy to > start, so I tried some tests and it seems fio has been increasingly > taking longer to start for some reason. Don't know if this is > expected or if something is wrong? Try the below. diff --git a/smalloc.c b/smalloc.c index 8412e7518464..ce64d6b73df6 100644 --- a/smalloc.c +++ b/smalloc.c @@ -213,7 +213,6 @@ static int add_pool(struct pool *pool, unsigned int alloc_size) if (ptr == MAP_FAILED) goto out_fail; - memset(ptr, 0, alloc_size); pool->map = ptr; pool->bitmap = (void *) ptr + (pool->nr_blocks * SMALLOC_BPL); -- Jens Axboe ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: Increasing startup time 2015-11-08 0:29 ` Jens Axboe @ 2015-11-08 0:34 ` Jens Axboe 2015-11-09 17:33 ` Matthew Eaton 0 siblings, 1 reply; 5+ messages in thread From: Jens Axboe @ 2015-11-08 0:34 UTC (permalink / raw) To: Matthew Eaton; +Cc: fio On Sat, Nov 07 2015, Jens Axboe wrote: > On Thu, Nov 05 2015, Matthew Eaton wrote: > > I noticed during testing recent fio releases it seemed bit laggy to > > start, so I tried some tests and it seems fio has been increasingly > > taking longer to start for some reason. Don't know if this is > > expected or if something is wrong? > > Try the below. Committed, with a fixup to still clear the actual bitmap. Should work faster for you than even the earlier versions you tested. commit 9c3e13e3314da394698ca32f21cc46d46b7cfe47 Author: Jens Axboe <axboe@fb.com> Date: Sat Nov 7 17:33:38 2015 -0700 smalloc: only clear the bitmap, not the whole pool This reduces startup time, and the memset() isn't useful nor needed on the full range. Signed-off-by: Jens Axboe <axboe@fb.com> diff --git a/smalloc.c b/smalloc.c index 8412e7518464..5047cda5e343 100644 --- a/smalloc.c +++ b/smalloc.c @@ -213,9 +213,9 @@ static int add_pool(struct pool *pool, unsigned int alloc_size) if (ptr == MAP_FAILED) goto out_fail; - memset(ptr, 0, alloc_size); pool->map = ptr; pool->bitmap = (void *) ptr + (pool->nr_blocks * SMALLOC_BPL); + memset(pool->bitmap, 0, bitmap_blocks * sizeof(unsigned int)); pool->lock = fio_mutex_init(FIO_MUTEX_UNLOCKED); if (!pool->lock) -- Jens Axboe ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: Increasing startup time 2015-11-08 0:34 ` Jens Axboe @ 2015-11-09 17:33 ` Matthew Eaton 2015-11-09 17:40 ` Jens Axboe 0 siblings, 1 reply; 5+ messages in thread From: Matthew Eaton @ 2015-11-09 17:33 UTC (permalink / raw) To: Jens Axboe; +Cc: fio > Committed, with a fixup to still clear the actual bitmap. Should work > faster for you than even the earlier versions you tested. Thank you for looking at this Jens! You are correct, startup times are even faster now. matt@matt-work:~$ time fio -v fio-2.1.14 real 0m0.008s user 0m0.000s sys 0m0.004s matt@matt-work:~$ time fio -v fio-2.1.14 real 0m0.008s user 0m0.004s sys 0m0.000s matt@matt-work:~$ time fio -v fio-2.1.14 real 0m0.008s user 0m0.000s sys 0m0.004s matt@matt-work:~$ time fio/fio -v fio-2.2.11-3-g9c3e real 0m0.003s user 0m0.000s sys 0m0.000s matt@matt-work:~$ time fio/fio -v fio-2.2.11-3-g9c3e real 0m0.003s user 0m0.000s sys 0m0.000s matt@matt-work:~$ time fio/fio -v fio-2.2.11-3-g9c3e real 0m0.003s user 0m0.004s sys 0m0.000s ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Increasing startup time 2015-11-09 17:33 ` Matthew Eaton @ 2015-11-09 17:40 ` Jens Axboe 0 siblings, 0 replies; 5+ messages in thread From: Jens Axboe @ 2015-11-09 17:40 UTC (permalink / raw) To: Matthew Eaton; +Cc: fio On 11/09/2015 10:33 AM, Matthew Eaton wrote: >> Committed, with a fixup to still clear the actual bitmap. Should work >> faster for you than even the earlier versions you tested. > > > Thank you for looking at this Jens! You are correct, startup times > are even faster now. Great, thanks for (re)testing. -- Jens Axboe ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-11-09 17:40 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-11-06 3:08 Increasing startup time Matthew Eaton 2015-11-08 0:29 ` Jens Axboe 2015-11-08 0:34 ` Jens Axboe 2015-11-09 17:33 ` Matthew Eaton 2015-11-09 17:40 ` Jens Axboe
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox