From: Jens Axboe <axboe@kernel.dk>
To: Vikram Seth <seth.vik@gmail.com>
Cc: fio@vger.kernel.org
Subject: Re: fio memory usage
Date: Wed, 18 Apr 2012 20:49:53 +0200 [thread overview]
Message-ID: <4F8F0CD1.7090605@kernel.dk> (raw)
In-Reply-To: <CAKa9NmtX=2jQGDGaesyLQtrpdHbPExZ6Dq4ikKOSt35NtbrBYw@mail.gmail.com>
On 2012-04-18 17:41, Vikram Seth wrote:
> Hi Jens,
>
> What's the max memory used per job (per device) for fio? Is there a
> rule of thumb for min memory needed for fio?
> Like, if I am running N #threads with numjobs on M #devices in the
> system, then I'd like to know if I have enough memory before I start
> the test rather than I wait for it to crashes days later.
>
> Also, in case fio finds that it is running out of memory while
> running, then does it generate an OOM kind of message in the output
> file that can be used to track the reason for a crashed test.
Generally, any memory that is being used is allocated before fio starts
running anything. That's not always strictly true. For verify workloads,
fio will store meta data for written blocks. So memory foot print could
grow for that. But that's the only case that isn't limited in that
sense. Fio will alloc small items while running, but now we are in the
sub-kb category. Things that should not fail. And they are continually
freed as well, so not persistent items.
Usually IO buffers will take the most memory. You can easily calculate
that, that would be queue_depth * max_buffer_size * number_of_jobs.
Outside of that, fio sets up a shared memory segment. Default on Linux
is 32MB. If you use a random workload and don't set norandommap, fio
will allocate a device/file sized bitmap for tracking which blocks have
been written or not. That consumes 1 byte per block per not-shared file.
So for a 500gb drive using 4kb blocks as the minimum IO size, that'd be
122070313 blocks or ~116MB of memory for that bitmap. That'd be your
biggest consumer of persistent memory, but one you can usually
eliminate.
Hope that helps...
--
Jens Axboe
next prev parent reply other threads:[~2012-04-18 18:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-18 15:41 fio memory usage Vikram Seth
2012-04-18 18:49 ` Jens Axboe [this message]
2012-04-18 18:54 ` Jens Axboe
2012-04-18 22:59 ` Vikram Seth
2012-04-19 7:54 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F8F0CD1.7090605@kernel.dk \
--to=axboe@kernel.dk \
--cc=fio@vger.kernel.org \
--cc=seth.vik@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.