Skip to contentSkip to conversation

blog article about f2fs on smr drives

DISCUSSION Chao Yu 3 participants 4 messages Nov 16, 2015 – Nov 17, 2015

lore
Share & tools
lore

Chao Yu

author
#0 lore raw

Hi Marc,

Quoted 6 lines

-----Original Message-----
From: Marc Lehmann [mailto:[email protected]]
Sent: Sunday, November 15, 2015 3:22 AM
To: [email protected]
Subject: Re: [f2fs-dev] blog article about f2fs on smr drives

Quoted 6 lines

So sorry again for me regular going into hiding, but I am now back on the SMR drive problems :)

So, first, a question - how many of the changes are now in 4.3 (and unfortunately, it seems 4.3 is still not stable with these drives, still leaving only 3.18 as an full option).

I think you could get the change information in below link:

http://sourceforge.net/p/linux-f2fs/mailman/message/34427519/

Quoted 11 lines

Next, I am trying to replicate my tests with faster data, and I get rather erratic results, e.g. (tar|buffer|tar, average file size 266MB, the source volume is capable of delivering sustained 200MB/s, so no bottleneck on the read side):

   summary: 2380.2 GB in 15 h 58 min 30.0 sec - average of 42.4 MB/s

While there are stretches at >>100MB/s, most of the time, this is at less, and often for long stretches at ~10MB/s, which is the reason the end result is (relatively) bad.

Could you please share us IO trace log?

Quoted 3 lines

And lastly, is there a document describing the implementation of encryption in the fs, and the goals (privacy? integrity? both?)

The feature was ported from ext4, please refer following article:

https://lwn.net/Articles/639427/

Quoted 13 lines

(If there isn't, I plan to review the encryption design in f2fs myself).

Quoted 4 lines · Jaegeuk Kim

Cool and pretty much interesting topic to me!

BTW, it might be best to publish this kind of investigation as papers or presentation later.

Maybe, I wonder how one would go about that (I never was involved with a serious paper, I will unlikely give presentations on that, but yes, I think somebody should :).

Quoted 8 lines
Quoted 4 lines · Chao Yu

I have tracked your IO trace log, I found an issue which may slow down our App, so I wrote the patch to optimize the flow mainly for SMR drive. I think we can tune up with /sys/fs/f2fs/(device)/ra_nid_pages to avoid long latency of creating node in f2fs.

Maybe that could help with my problem - a git pull of the 3.18 branch seems to have your changes in it - anything in specific that I should do?

As I checked, related patches were merged into linux-3.18 branch in Jaegeuk's git tree. It's OK to use that tree.

Quoted 4 lines

from the Changes, it doesn't quite sound as if it will be a big help, as there is very little read traffic overall, but I didn't analyze the IO trace :)

Actually, as I test in flash device, it does help to improve performance in workload of creating nodes aggressively, this is because we add asynchronous readahead to mitigate small synchronous random read which may block all APPs sometime. Considering rotational device has worse random synchronous read performance, I expect better result in SMR.

Quoted 3 lines

it does sound like something that could be very useful for rotational disks in general, under normal conditions (reading), though.

I hope it will be useful in workload of nodes allocation storm rather than in condition of read.

Quoted 6 lines
Quoted 3 lines

If you want to have a test with the new tunable parameter, last git tree is preferred. :)

Sure, will be happy to do that, what should I tune how? And thanks for working on this!

IMO, one way is to do the test with default value and then do geometrically increasing with the value to see how it affects the IO.

Thanks,

Quoted 9 lines

--

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [email protected]
      -=====/_/_//_/\_,_/ /_/\_\
Quoted 5 lines

------------------------------------------------------------------------------
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially developed by Facebook, enables you to easily query your data on Hadoop in a more interactive manner. Teradata is also now providing full enterprise support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140

#1 lore raw
Quoted 3 lines · Chao Yu

I think you could get the change information in below link:

http://sourceforge.net/p/linux-f2fs/mailman/message/34427519/

Right, I saw the merge requests, but I don't know if these have been accepted for 4.3. I assume they are, thanks for finding them again for me.

Quoted 5 lines
Quoted 3 lines

While there are stretches at >>100MB/s, most of the time, this is at less, and often for long stretches at ~10MB/s, which is the reason the end result is (relatively) bad.

Could you please share us IO trace log?

I am already working on it, I just didn't expect it to be a problem. Also, I did it without your patch.

Quoted 6 lines
Quoted 2 lines

And lastly, is there a document describing the implementation of encryption in the fs, and the goals (privacy? integrity? both?)

The feature was ported from ext4, please refer following article:

https://lwn.net/Articles/639427/

I see, so it inherits all the security issues of that design.

Quoted 5 lines

Actually, as I test in flash device, it does help to improve performance in workload of creating nodes aggressively, this is because we add asynchronous readahead to mitigate small synchronous random read which may block all APPs sometime. Considering rotational device has worse random synchronous read performance, I expect better result in SMR.

Ok, that could help, as even a relatively small number of random reads could cause performance regressions (did the original 3.18 code not yet do this?)

I was a bit confused by the use of SMR, as SMRs don't suffer more from random reads as othere rotational devices (in fact, they can suffer less, if the data is still in the journal).

Quoted 5 lines
Quoted 2 lines

Sure, will be happy to do that, what should I tune how? And thanks for working on this!

IMO, one way is to do the test with default value and then do geometrically increasing with the value to see how it affects the IO.

I am not sure I can make a large number of tests, I will try to do smaller tests and see if I can make more of them and see a difference.

Thanks again!

Signature · 13 lines
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [email protected]
      -=====/_/_//_/\_,_/ /_/\_\

------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a 
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
#2 lore raw
Quoted 7 lines · Marc Lehmann
Quoted 3 lines · Chao Yu

I think you could get the change information in below link:

http://sourceforge.net/p/linux-f2fs/mailman/message/34427519/

Right, I saw the merge requests, but I don't know if these have been accepted for 4.3. I assume they are, thanks for finding them again for me.

Of course, those were merged.

Quoted 25 lines
Quoted 6 lines
Quoted 4 lines

While there are stretches at >>100MB/s, most of the time, this is at less, and often for long stretches at ~10MB/s, which is the reason the end result is (relatively) bad.

Could you please share us IO trace log?

I am already working on it, I just didn't expect it to be a problem. Also, I did it without your patch.

Quoted 6 lines
Quoted 2 lines

And lastly, is there a document describing the implementation of encryption in the fs, and the goals (privacy? integrity? both?)

The feature was ported from ext4, please refer following article:

https://lwn.net/Articles/639427/

I see, so it inherits all the security issues of that design.

Quoted 5 lines

Actually, as I test in flash device, it does help to improve performance in workload of creating nodes aggressively, this is because we add asynchronous readahead to mitigate small synchronous random read which may block all APPs sometime. Considering rotational device has worse random synchronous read performance, I expect better result in SMR.

Quoted 6 lines

Ok, that could help, as even a relatively small number of random reads could cause performance regressions (did the original 3.18 code not yet do this?)

I was a bit confused by the use of SMR, as SMRs don't suffer more from random reads as othere rotational devices (in fact, they can suffer less, if the data is still in the journal).

The important point here is that such the read operations to build free nids hurts the concurrency of filesystem operations.

Quoted 9 lines
Quoted 6 lines
Quoted 3 lines

Sure, will be happy to do that, what should I tune how? And thanks for working on this!

IMO, one way is to do the test with default value and then do geometrically increasing with the value to see how it affects the IO.

I am not sure I can make a large number of tests, I will try to do smaller tests and see if I can make more of them and see a difference.

Thanks,

Quoted 21 lines

Thanks again!

Signature · 17 lines
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [email protected]
      -=====/_/_//_/\_,_/ /_/\_\

------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a 
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

------------------------------------------------------------------------------

author
#3 lore raw
In reply to Marc Lehmann

Hi Marc,

Quoted 33 lines

-----Original Message-----
From: Marc Lehmann [mailto:[email protected]]
Sent: Tuesday, November 17, 2015 7:53 AM
To: Chao Yu
Cc: [email protected]
Subject: Re: [f2fs-dev] blog article about f2fs on smr drives

Quoted 3 lines · Chao Yu

I think you could get the change information in below link:

http://sourceforge.net/p/linux-f2fs/mailman/message/34427519/

Right, I saw the merge requests, but I don't know if these have been accepted for 4.3. I assume they are, thanks for finding them again for me.

Quoted 5 lines
Quoted 3 lines

While there are stretches at >>100MB/s, most of the time, this is at less, and often for long stretches at ~10MB/s, which is the reason the end result is (relatively) bad.

Could you please share us IO trace log?

I am already working on it, I just didn't expect it to be a problem. Also, I did it without your patch.

Quoted 6 lines
Quoted 2 lines

And lastly, is there a document describing the implementation of encryption in the fs, and the goals (privacy? integrity? both?)

The feature was ported from ext4, please refer following article:

https://lwn.net/Articles/639427/

I see, so it inherits all the security issues of that design.

Quoted 8 lines
Quoted 5 lines

Actually, as I test in flash device, it does help to improve performance in workload of creating nodes aggressively, this is because we add asynchronous readahead to mitigate small synchronous random read which may block all APPs sometime. Considering rotational device has worse random synchronous read performance, I expect better result in SMR.

Ok, that could help, as even a relatively small number of random reads could cause performance regressions (did the original 3.18 code not yet do this?)

As Jaegeuk mentioned, the serious problem here is all node allocaters who may generate more dirty data later will be blocked by it, so continuous write stream will be broken, IOs in disk may drop after a while.

Quoted 4 lines

I was a bit confused by the use of SMR, as SMRs don't suffer more from random reads as othere rotational devices (in fact, they can suffer less, if the data is still in the journal).

You mean journal region in disk, right? Read IO still goes to that region on disk. So why SMR suffers less than other rotations? Or readahead in that region can do some help when most of random reads goes to the journal.

Quoted 9 lines
Quoted 6 lines
Quoted 3 lines

Sure, will be happy to do that, what should I tune how? And thanks for working on this!

IMO, one way is to do the test with default value and then do geometrically increasing with the value to see how it affects the IO.

I am not sure I can make a large number of tests, I will try to do smaller tests and see if I can make more of them and see a difference.

That's OK, one thing I should mention is that small file is preferred in our test. :)

Thanks,

Quoted 10 lines

Thanks again!

--

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      [email protected]
      -=====/_/_//_/\_,_/ /_/\_\

------------------------------------------------------------------------------