Fedora Linux Support Community & Resources Center
  #1  
Old 13th March 2016, 06:02 AM
lsatenstein Online
Registered User
 
Join Date: Jun 2005
Location: Montreal, Que, Canada
Posts: 4,267
linuxfedorafirefox
Benchmark ext4 vs f2fs

f2fs is a new filesystem from Samsung. It has been designed for SSD's and is organized to minimize the need to do a SSD trim. I had the idea to check out f2fs on a pair of physical 7200rpm 1 terrabyte drives.

I thought it would be good to see what the timings would be like to write out about 275gigs of files to a
empty 309gig ext4 partition and to redo the test against a 309gig f2fs partition
Code:
time cp -rp /scratch/*  /ext4scratch          (separate disks)
time cp -rp /scratch/*   /f2fs                (separate disks) 
Here goes
EXT4                     F2FS                
78m28.055               78m24.735  Real
    2.973s                  2.944s  User
  6m65.045               7m3.920 System
Essentially, creating the files is about the same (f2fs = a little more system cpu, a little less elapsed time)

My next two tests will be for read timing differences.


Well, I have some test results.
using
time tar -cjf /dev/null /ext4scratch
real 0m13.133s
user 0m2.409s
sys 0m3.098s

time tar -cjf /dev/null /f2fs
real 2m5.169s
user 0m3.690s
sys 0m9.920s

Test 2 (no reboot)
time tar -cjf /dev/null /ext4scratch
real 0m4.295s
user 0m2.222s
sys 0m2.068s

time tar -cjf /dev/null /f2fs
real 0m3.679s
user 0m2.003s
sys 0m1.673s

Not sure why my first test for /f2fs took so long. but I will reboot and try it again.
__________________
Leslie in Montreal

Interesting web sites list
http://forums.fedoraforum.org/showth...40#post1697840

Last edited by lsatenstein; 14th March 2016 at 05:36 AM. Reason: results
Reply With Quote
  #2  
Old 14th March 2016, 05:35 AM
lsatenstein Online
Registered User
 
Join Date: Jun 2005
Location: Montreal, Que, Canada
Posts: 4,267
linuxfedorafirefox
Re: Benchmark ext4 vs f2fs

After a reboot (to be certain that there was no cached results

Well, I have some test results.
using
time tar -cjf /dev/null /ext4scratch
real 0m13.133s
user 0m2.409s
sys 0m3.098s

time tar -cjf /dev/null /f2fs
real 2m5.169s
user 0m3.690s
sys 0m9.920s

And again after a reboot
time tar -cjf /dev/null /ext4scratch
real 0m16.889s
user 0m2.599s
sys 0m3.490s

time tar -cjf /dev/null /f2fs
real 2m9.526s
user 0m3.707s
sys 0m9.851s

I would not use f2fs as a tuned file system. Once the directories are in cache memory, f2fs works trivially faster than ext4.

I have not tested either for crash recovery. I am not certain on how to set up that kind of test.
__________________
Leslie in Montreal

Interesting web sites list
http://forums.fedoraforum.org/showth...40#post1697840
Reply With Quote
  #3  
Old 14th March 2016, 12:59 PM
nonamedotc Offline
Mithrandir
 
Join Date: Mar 2011
Location: /
Posts: 5,002
windows_7firefox
Re: Benchmark ext4 vs f2fs

perhaps you can use phoronix-test-suites and run some rigorous benchmarks if interested.

Code:
dnf install phoronix-test-suite
__________________
Fedora 24 x86_64 XFCE - Sager | Intel Core i7 - 4810 MQ | NVIDIA GeForce GTX 860M | 16 GB RAM | 480 GB ADATA SSD |
CentOS 7.2.1511 x86_64 Server - Thinkpad T520 | Intel Core i7 - 2630 QM | NVIDIA NVS 4200M | 16 GB RAM | 500 GB 7200 RPM HDD |


The Linux Documentation Project | Fedora Documentation
Reply With Quote
  #4  
Old 14th March 2016, 05:25 PM
lsatenstein Online
Registered User
 
Join Date: Jun 2005
Location: Montreal, Que, Canada
Posts: 4,267
linuxfedorafirefox
Re: Benchmark ext4 vs f2fs

Hi Mukundan.

While sleeping my 8 hrs from 11pm to 7am, I dreamt a realization as to why the f2fs is slower immediately after a reboot, when compared is ext4.

ext4 and it's design are geared to spinning disks. The disk microcode does some I/O queuing, so that the read(s) will be done when the read head is at the correct position of the spinning disk. There may be several I/O operations in the queue,with the I/Os completed out of chronological sequence. (for the disk, not fifo, for the tar program, definitely fifo).

With f2fs, built for SSD,s, the driver logic does not require accounting for any rotational delay. The I/O is done immediately,with the driver immediately waiting for the response. (SSDs do not have rotational delay).

Therefore, when f2fs is done on a spinning disk partition, each I/0 is delayed by the average time for the hard disk to make one revolution. (7200 rpm = 120 rotations / second or about 8.3 ms per rotation.) I could say that after a boot, where there is no sector cache accumulated, each I/O for f2fs against a spinning disk is delayed by roughly 4.2 milliseconds.

Is my reasoning wrong about f2fs? I believe that f2fs is absolutely a great SSD file system.
__________________
Leslie in Montreal

Interesting web sites list
http://forums.fedoraforum.org/showth...40#post1697840

Last edited by lsatenstein; 14th March 2016 at 10:34 PM.
Reply With Quote
  #5  
Old 14th March 2016, 05:35 PM
antikythera Offline
Administrator
 
Join Date: Dec 2013
Location: United Kingdom
Posts: 5,073
windows_7firefox
Re: Benchmark ext4 vs f2fs

f2fs is specifically designed for flash media so mechanical drives will perform slightly worse than ext4. xda-developers converted a Nexus 7 file system to f2fs to compare the performance with standard ext4 under Android. I'm more interested in XFS and ZFS but am sticking with ext4 personally as I don't span hard drives or use massive data sets. RHEL 7 uses XFS as the default file system though.
__________________
Download, Install and Share Fedora - Official ISO Torrents | Live ISO Respins containing post-release updates
Reply With Quote
  #6  
Old 14th March 2016, 10:36 PM
lsatenstein Online
Registered User
 
Join Date: Jun 2005
Location: Montreal, Que, Canada
Posts: 4,267
linuxfedorafirefox
Re: Benchmark ext4 vs f2fs

Quote:
Originally Posted by arehtykitna View Post
f2fs is specifically designed for flash media so mechanical drives will perform slightly worse than ext4. xda-developers converted a Nexus 7 file system to f2fs to compare the performance with standard ext4 under Android. I'm more interested in XFS and ZFS but am sticking with ext4 personally as I don't span hard drives or use massive data sets. RHEL 7 uses XFS as the default file system though.
Hi Mike

Would you be considering f2fs for the SSDs you acquire. I am actually thinking of replacing xfs (on my SSD) with f2fs.

Stevea pointed out to me that he had tested it, without issues. That is why I also put it on my SSD as a small active partition.
__________________
Leslie in Montreal

Interesting web sites list
http://forums.fedoraforum.org/showth...40#post1697840
Reply With Quote
  #7  
Old 14th March 2016, 10:51 PM
antikythera Offline
Administrator
 
Join Date: Dec 2013
Location: United Kingdom
Posts: 5,073
windows_98_nt_2000chrome
Re: Benchmark ext4 vs f2fs

possibly if it is recognised officially and adopted as a filing system by Red Hat. My concern with development file systems is their longevity. I'd rather stick with officially recognised file systems for the time being e.g. offered for use by the install process. So in this instance I'm more likely to use either XFS or BTRFS
__________________
Download, Install and Share Fedora - Official ISO Torrents | Live ISO Respins containing post-release updates
Reply With Quote
  #8  
Old 17th March 2016, 03:36 AM
stevea
Guest
 
Posts: n/a
linuxchrome
Re: Benchmark ext4 vs f2fs






Well there are just a few problems with this test ....


Quote:
Originally Posted by lsatenstein View Post
f2fs is a new filesystem from Samsung. It has been designed for SSD's
1/ No. It's designed for all FLASH based storage from USB sticks, to SDHC cards and even to SSD drives with their advanced controllers. F2FS is primarily for embedded devices like phones, but performs well on SSDs, and likely M.2 SS storage.

Quote:
and is organized to minimize the need to do a SSD trim.
2/ No - 'TRIM' is strictly for SATA/SCSI devices (so SSD drives in this case) and it necessarily discard/trims one i/o block for block released.


Quote:
I had the idea to check out f2fs on a pair of physical 7200rpm 1 terrabyte drives.
3/ And testing a FLASH file system on a non-FLASH device will show us what exactly ?
Are you goings to install a UBIFS layer on your rotating device too ? Seems a like testing a toaster at the bottom of a pool - but have at it.



Quote:
I thought it would be good to see what the timings would be like to write out about 275gigs of files to a empty 309gig ext4 partition and to redo the test against a 309gig f2fs partition
Code:
time cp -rp /scratch/*  /ext4scratch          (separate disks)
time cp -rp /scratch/*   /f2fs                (separate disks) 
Here goes
EXT4                     F2FS                
78m28.055               78m24.735  Real
    2.973s                  2.944s  User
  6m65.045               7m3.920 System
Essentially, creating the files is about the same (f2fs = a little more system cpu, a little less elapsed time)
nit1/ "cp -a" is your pal if you want the target to include file metadata extension, like SELinux context or the extended posix permissions.

nit2/ the 'time used here, from the bash shell, is generally inferior to /usr/bin/time esp since it shows disk (not pipe) i/o counts.
Code:
[stevea@hypoxylon Desktop]$ /usr/bin/time ls -laR /home/common/Music  > /dev/null
0.00user 0.03system 0:00.21elapsed 18%CPU (0avgtext+0avgdata 3000maxresident)k
9784inputs+0outputs (1major+145minor)pagefaults 0swaps
4/ You need to test the read access from the source directory so we can see if it's the dominant factor (likely) perhaps like /usr/bin/time tar -cf - /somedir | cat > /dev/null . More on this later.

5/ You must clear the buffer caches before each run, otherwise the contents impact subsequent runs. Using this command for example ... echo 3 > /proc/sys/vm/drop_caches (as root)


Quote:
My next two tests will be for read timing differences.

Well, I have some test results.
using
time tar -cjf /dev/null /ext4scratch
real 0m13.133s
user 0m2.409s
sys 0m3.098s

time tar -cjf /dev/null /f2fs
real 2m5.169s
user 0m3.690s
sys 0m9.920s

Test 2 (no reboot)
time tar -cjf /dev/null /ext4scratch
real 0m4.295s
user 0m2.222s
sys 0m2.068s

time tar -cjf /dev/null /f2fs
real 0m3.679s
user 0m2.003s
sys 0m1.673s

Not sure why my first test for /f2fs took so long. but I will reboot and try it again.
6/ the tar 'j' option does compression ad adds to CPU time (mostly user) so it confounds the test.

Then the big thud ...
You might want to do a sanity check (perhaps more often than most). Do you really believe that tar read 275GB in 4 seconds or even 13 seconds ? That's ~70GB/second or about 500 times faster than the best 7200rpm drives made. Even the 2 minute reads vs 78 minute writes should set off huge red flags. Reads are generally faster than writes. The problem is this ...

7/ "tar -f /dev/null" and "tar -c - > /dev/null" and variation cause tar to NOT read the data but only walk the directories for total size. When the tar command examines the archive output and it matches the /dev/null then it does something very different. Note that output to a pipe works, so we can do this instead ....
tar -cf - /some/dir | cat > /dev/null


Here for example:

Code:
[stevea@hypoxylon Desktop]$ /usr/bin/time tar cf - /home/common/Music > /dev/null
tar: Removing leading `/' from member names
0.05user 0.02system 0:00.33elapsed 24%CPU (0avgtext+0avgdata 2888maxresident)k
5336inputs+0outputs (2major+153minor)pagefaults 0swaps
Code:
[stevea@hypoxylon Desktop]$ /usr/bin/time tar cf - /home/common/Music | cat > /dev/null
tar: Removing leading `/' from member names
1.16user 24.55system 2:18.51elapsed 18%CPU (0avgtext+0avgdata 2988maxresident)k
39372344inputs+0outputs (1major+158minor)pagefaults 0swaps
nit3/ All this test intended to do was write files once to a virgin file system and then read them back. That tells us very little about the important behavior of a file system when files are deleted, added, modified, and when the tables get dirty, and especially when FLASH blocks must be managed.

===

3 nits and 7 error in one test, not even close to your record, so congrats


---
Addendum.
Another error (should be 5.5/) - you didn't flush the writes before measuring the write time [it mostly doesn't matter for reads] .In a real disk test the code would cause a flush before exiting, but here we can't re-write the 'cp' command, so we should use 'sync -f /ext4scratch', and include that time in the total. Something like .....

echo 3 > /proc/sys/vm/drop_caches
/usr/bin/time bash -c '(cp -a /src /ext4scratch ; sync -f /ext4scratch)'

Last edited by stevea; 17th March 2016 at 03:52 AM. Reason: addendum
Reply With Quote
  #9  
Old 17th March 2016, 04:39 AM
lsatenstein Online
Registered User
 
Join Date: Jun 2005
Location: Montreal, Que, Canada
Posts: 4,267
linuxfedorafirefox
Re: Benchmark ext4 vs f2fs

Steve,
You are right, I did not do an exhaustive test.

I was curious about f2fs, and if it was worth the switchover. I did not cut hairs to get high precision. I am actually using xfs (a default filesystem from Fedora23). It seems to me from what Samsung wrote, that it would be a good alternative filesystem for SSDs. I was curious about it's use with hard disks.

Though I stated it, I did a reboot between each test as that would guarantee me no cached data.
My superficial test showed what results I obtained, I felt that f2fs was not worth entering into a more indepth study.
My write tests were done immediately after a boot and a login, ditto for the reads. The sync command would have been nice to do, for the writes and reads.

My personal conclusion for my needs is stay with xfs for now.

By the way, I thank you and I do appreciate your critique of my postings. I can appreciate the effort you put into preparing it, and I did learn more than a thing or two from your posting.
__________________
Leslie in Montreal

Interesting web sites list
http://forums.fedoraforum.org/showth...40#post1697840
Reply With Quote
  #10  
Old 27th March 2016, 04:30 PM
antikythera Offline
Administrator
 
Join Date: Dec 2013
Location: United Kingdom
Posts: 5,073
linuxchrome
Re: Benchmark ext4 vs f2fs

Apparently their's a new FS supported by Kernel 4.6 called OrangeFS.

The number of people that are forking file systems because they think they can improve on them is getting silly. I think we should create a new one specifically to give it a new name and high failure and latency rate. And we shall called it BSFS...
__________________
Download, Install and Share Fedora - Official ISO Torrents | Live ISO Respins containing post-release updates
Reply With Quote
  #11  
Old 27th March 2016, 08:10 PM
flyingdutchman Offline
Registered User
 
Join Date: Jan 2015
Location: Al Ain, UAE
Posts: 694
macosfirefox
Re: Benchmark ext4 vs f2fs

Quote:
Originally Posted by arehtykitna View Post
Apparently their's a new FS supported by Kernel 4.6 called OrangeFS.
It is a parallel file system for super computers. So, it is not for most ordinary mortals, but you can have a Beowulf cluster of it...
__________________
--
Have fun!
http://www.aeronetworks.ca
Reply With Quote
  #12  
Old 27th March 2016, 08:22 PM
lsatenstein Online
Registered User
 
Join Date: Jun 2005
Location: Montreal, Que, Canada
Posts: 4,267
linuxfedorafirefox
Re: Benchmark ext4 vs f2fs

I like Arehtykitna's bsfs It adapts to any fs definition that is not yet in the kernal. BS is a master (male) FS and CP is a slave, also called cPoop.

You can milk the slave to squeeze out the last drop of performance. BSfs is a mountable file system.
__________________
Leslie in Montreal

Interesting web sites list
http://forums.fedoraforum.org/showth...40#post1697840
Reply With Quote
  #13  
Old 28th March 2016, 02:47 PM
antikythera Offline
Administrator
 
Join Date: Dec 2013
Location: United Kingdom
Posts: 5,073
windows_98_nt_2000chrome
Re: Benchmark ext4 vs f2fs

Quote:
Originally Posted by flyingdutchman View Post
It is a parallel file system for super computers. So, it is not for most ordinary mortals, but you can have a Beowulf cluster of it...
Yeah, I'm aware of that. I was just making a point about the re-invention of the wheel yet again. Open and closed source development of Linux is becoming so heavily fragmented it wouldn't surprise me if people are working to 'fix' the same issue multiple times over in different parts of the world without even realising until a new development is announced
__________________
Download, Install and Share Fedora - Official ISO Torrents | Live ISO Respins containing post-release updates
Reply With Quote
  #14  
Old 28th March 2016, 06:13 PM
lsatenstein Online
Registered User
 
Join Date: Jun 2005
Location: Montreal, Que, Canada
Posts: 4,267
linuxfedorafirefox
Re: Benchmark ext4 vs f2fs

A story

I became interested in SUSE and thought that I needed to know more than just RedHat and Fedora.
I installed Leap4.1 and I ran into problems with sound. Within a day or two, I was contacted with a fix that worked.

I also discovered a problem for SUSE with os-prober. SUSE reworked os-prober so that it can work well with btrfs and more. Before the fix, osprober could take upto two hours to scan btrfs files. I was using Fedora with btrfs and os-prober choked on it. Every other day, I received a fix, i tested, and submitted results. The programmer was 12 hours ahead of me, timezone wise.

We got that os-prober fixed. /boot can now be within a btrfs subvolume and os-prober works quite quickly. Not a quick exectution before the fix.

So my question is "Is os-prober saved in a git repository for all distributions which make use of it, is it that whatever distribution makes use of it they update a common location?
__________________
Leslie in Montreal

Interesting web sites list
http://forums.fedoraforum.org/showth...40#post1697840
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
F23: Howto boot from a f2fs partition? georgy1 Installation, Upgrades and Live Media 1 25th February 2016 07:52 PM
f2fs available in this release?? jerryw6181 Installation, Upgrades and Live Media 3 27th May 2015 12:14 PM
Mounting F2FS formatted SD cards Steve80289 Installation, Upgrades and Live Media 0 16th April 2014 09:04 PM
GPU Benchmark DB? schotty Hardware & Laptops 1 9th October 2010 03:48 PM
benchmark TraceTheory Using Fedora 4 14th December 2006 07:53 PM


Current GMT-time: 23:33 (Wednesday, 20-09-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat