All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Sequential read/write with multiple threads
       [not found] <5ac69854-8385-6e5e-4a88-76f0880a6c6e@eafit.edu.co>
@ 2020-04-30  6:10 ` Hamilton Tobon Mosquera
  0 siblings, 0 replies; 4+ messages in thread
From: Hamilton Tobon Mosquera @ 2020-04-30  6:10 UTC (permalink / raw)
  To: fio

Hi there,

Yes I saw it. Thank you very much for your help.

I finally got it to run by using the flags size and offset_increment. An 
example for future readers:

I'm trying to do sequential and random requests to the same file with 
multiple threads, preventing each thread to interfere in other thread's 
requests. My file size is 200G, then, if the number of threads is 4, I 
set the flag --size to 50G, that is, I divide the file size into the 
number of threads. Also, as offset_increment accepts a percentage, I 
divide 100% into the number of threads, in this case I set it to 25%. 
With these two flags each thread starts doing the specified requests 
adding 50G to the offset (because that's 25% percent of the file) and 
they only issue requests up to 50G, preventing an overflow to other 
thread's chunk or outside the file.

Even though it's working for me (it's not crashing, nor screwing the 
file), If I'm wrong in something please correct me.

Thank you.

Hamilton.

On 30/04/20 1:59 a. m., Sitsofe Wheeler wrote:
> On Wed, 29 Apr 2020 at 15:41, Hamilton Tobon Mosquera
> <htobonm@eafit.edu.co> wrote:
>> Hi there, I send this again, I'm not sure if it was sent last time, I
>> thought I was subscribed to the mailing list but I wasn't.
> Did you see my reply to your previous mail -
> https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.spinics.net%2Flists%2Ffio%2Fmsg08483.html&amp;data=01%7C01%7Chtobonm%40eafit.edu.co%7C969ea7f7c9f64f8a377808d7eccbbcfd%7C99f7b55e9cbe467b8143919782918afb%7C0&amp;sdata=f7lIoMftni9kAlZu5j0TKfzjtByBt21lpm2BeOs0gF4%3D&amp;reserved=0 
> ?
>
>
> --
> Sitsofe | 
> https://nam01.safelinks.protection.outlook.com/?url=http:%2F%2Fsucs.org%2F~sits%2F&amp;data=01%7C01%7Chtobonm%40eafit.edu.co%7C969ea7f7c9f64f8a377808d7eccbbcfd%7C99f7b55e9cbe467b8143919782918afb%7C0&amp;sdata=JmGkoD6x%2F%2FF6Rh%2B9PvrQucHElsF8yIGlDcY3gcsiR4o%3D&amp;reserved=0
> La información contenida en este correo electrónico estádirigida 
> únicamente a su destinatario y puede contener información 
> confidencial, material privilegiado o información protegida porderecho 
> de autor. Está prohibida cualquier copia, utilización,indebida 
> retención, modificación, difusión, distribución o reproducción total o 
> parcial. Si usted recibe este mensaje por error, por favor contacte al 
> remitente y elimínelo. La información aquí contenida es 
> responsabilidad exclusiva de su remitente porlo tanto la Universidad 
> EAFIT no se hace responsable de lo que el mensaje contenga. The 
> information contained in this email is addressed to its recipient only 
> and may contain confidential information, privileged material or 
> information protected by copyright. Its prohibited any copy, use, 
> improper retention, modification, dissemination, distribution or total 
> or partial reproduction. If you receive this message by error, please 
> contact the sender and delete it. The information contained herein is 
> the sole responsibility of the sender therefore Universidad EAFIT is 
> not responsible for what the message contains.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Sequential read/write with multiple threads
@ 2020-04-29 14:40 Hamilton Tobon Mosquera
  0 siblings, 0 replies; 4+ messages in thread
From: Hamilton Tobon Mosquera @ 2020-04-29 14:40 UTC (permalink / raw)
  To: fio

Hi there, I send this again, I'm not sure if it was sent last time, I 
thought I was subscribed to the mailing list but I wasn't.

I'm trying to run some benchmarks using the ioegnines libaio and 
pvsync2. I'm trying to run sequential reads/writes and random 
read/writes in a file of 200G with a maximum of 4 jobs, that is, 
threads. I don't mix them, that is, I run sequentially or randomly 
reads/writes.

My question is this: when running sequentially, given that I'm using 4 
threads, is it really sequential?. Do the threads interfere with each 
other?, if yes, which options should I use to make each thread only 
issue requests to disjoint parts of the file, each of 50G (in case of 4 
threads). I tried using offset_increment, but sometimes it overflows on 
random requests, and for sequential requests the file size increases 
automatically, that is, the requests are going further the size of the 
file, but it does not crashes. More specifically, I get the file size in 
bytes, exactly 214748364800. I divide that number in the number of 
threads, and I use the result as the offset_increment. The file is 
created using the filecreate engine with size 200G.

Lastly, is it possible for each thread to issue random requests only in 
that piece of 50G, so that it does not overflows to other threads piece 
of file or even overflow outside the file?.

Perhaps I'm doing something wrong. Could someone please help me?.

Thank you.

Hamilton.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Sequential read/write with multiple threads
  2020-04-29  3:38 Hamilton Tobon Mosquera
@ 2020-04-29  5:33 ` Sitsofe Wheeler
  0 siblings, 0 replies; 4+ messages in thread
From: Sitsofe Wheeler @ 2020-04-29  5:33 UTC (permalink / raw)
  To: Hamilton Tobon Mosquera; +Cc: fio

Hi,

On Wed, 29 Apr 2020 at 04:39, Hamilton Tobon Mosquera
<htobonm@eafit.edu.co> wrote:
>
> Hi there,
>
> I'm trying to run some benchmarks using the ioegnines libaio and
> pvsync2. I'm trying to run sequential reads/writes and random
> read/writes in a file of 200G with a maximum of 4 jobs, that is,
> threads. I don't mix them, that is, I run sequentially or randomly
> reads/writes.
>
> My question is this: when running sequentially, given that I'm using 4
> threads, is it really sequential?. Do the threads interfere with each
> other?, if yes, which options should I use to make each thread only

Sequential to which layer? It's worth noting that the more concurrent
sequential streams there are the more a workload will appear to be
random to the lower levels. From an fio perspective without seeing the
actual job it's hard to answer your question. For example, if each of
the four sequential jobs are working on the same file (because you
specified filename) then there's a high chance of interference and
it's hard to say what the interference will look like given the
interaction of the cache etc. If they are separate files then I guess
you would argue they don't interfere...

> issue requests to disjoint parts of the file, each of 50G (in case of 4
> threads). I tried using offset_increment, but sometimes it overflows on
> random requests, and for sequential requests the file size increases
> automatically, that is, the requests are going further the size of the
> file, but it does not crashes. More specifically, I get the file size in
> bytes, exactly 214748364800. I divide that number in the number of
> threads, and I use the result as the offset_increment. The file is
> created using the filecreate engine with size 200G.

In your case I would expect you would have to use offset AND size to
limit the region worked within (see
https://fio.readthedocs.io/en/latest/fio_doc.html#cmdoption-arg-offset
).

> Lastly, is it possible for each thread to issue random requests only in
> that piece of 50G, so that it does not overflows to other threads piece
> of file or even overflow outside the file?.

See above!

-- 
Sitsofe | http://sucs.org/~sits/


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Sequential read/write with multiple threads
@ 2020-04-29  3:38 Hamilton Tobon Mosquera
  2020-04-29  5:33 ` Sitsofe Wheeler
  0 siblings, 1 reply; 4+ messages in thread
From: Hamilton Tobon Mosquera @ 2020-04-29  3:38 UTC (permalink / raw)
  To: fio

Hi there,

I'm trying to run some benchmarks using the ioegnines libaio and 
pvsync2. I'm trying to run sequential reads/writes and random 
read/writes in a file of 200G with a maximum of 4 jobs, that is, 
threads. I don't mix them, that is, I run sequentially or randomly 
reads/writes.

My question is this: when running sequentially, given that I'm using 4 
threads, is it really sequential?. Do the threads interfere with each 
other?, if yes, which options should I use to make each thread only 
issue requests to disjoint parts of the file, each of 50G (in case of 4 
threads). I tried using offset_increment, but sometimes it overflows on 
random requests, and for sequential requests the file size increases 
automatically, that is, the requests are going further the size of the 
file, but it does not crashes. More specifically, I get the file size in 
bytes, exactly 214748364800. I divide that number in the number of 
threads, and I use the result as the offset_increment. The file is 
created using the filecreate engine with size 200G.

Lastly, is it possible for each thread to issue random requests only in 
that piece of 50G, so that it does not overflows to other threads piece 
of file or even overflow outside the file?.

Perhaps I'm doing something wrong. Could someone please help me?.

Thank you.

Hamilton.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-30  6:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <5ac69854-8385-6e5e-4a88-76f0880a6c6e@eafit.edu.co>
2020-04-30  6:10 ` Sequential read/write with multiple threads Hamilton Tobon Mosquera
2020-04-29 14:40 Hamilton Tobon Mosquera
  -- strict thread matches above, loose matches on Subject: below --
2020-04-29  3:38 Hamilton Tobon Mosquera
2020-04-29  5:33 ` Sitsofe Wheeler

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.