Welcome, Guest. Please login or register.

Author Topic: Performance difference between PFS3 and UFS2 ?  (Read 1921 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline olsen

Re: Perforrmance difference between PFS3 and UFS2 ?
« on: April 20, 2011, 07:15:41 AM »
Quote from: kolla;632540
Port PFS3 to FreeBSD and find out.


Good one ;)  But there would be some merit to analyze what PFS3 does, and how well, too. As far as I know, no detailed analysis of PFS3 was ever published which goes into the details of how the storage allocation works, how fragmentation is kept at bay, and how the data structures look like. By comparison, all this is known and documented for the old Unix file system, and even the Amiga's various own OFS/FFS/DCFS flavours.
 

Offline olsen

Re: Perforrmance difference between PFS3 and UFS2 ?
« Reply #1 on: April 20, 2011, 10:06:30 AM »
Quote from: Thomas;632553
Data structures were delivered with the product in form of a C header file and the documentation contains a bit of information about how fragmentation is kept small. IIRC it always allocates new files in the largest contiguous free area.


I was hoping for documentation, not data structure declarations ;)  As with data structures, algorithms and the intentions behind them are often hard to fathom in file systems. You wouldn't know how the Amiga FFS, for example, does its job by looking at the source code. You have to read and understand the whole thing, look at what is written to the storage medium. It's better if the designer goes to some lengths to explain what is going on inside the code.

As for managing fragmentation, it's one of the toughest tasks in a file system. Using the largest free fragment by default is not necessarily a winning strategy, as there might be other free fragments which are shorter and might fit the size requirements better without wasting additional space. Also, one has to consider the distance between the end of the file and the place where the new data goes. XFS, for example, keeps track of both proximity of free space and size of free space in two separate b-tree data structures. Through this XFS can both find the smallest free space fragment that fits, and which is closest to the end of the file to be extended.