Physical disk IO size smaller than fragment block filesystem size ? | Unix Linux Forums | UNIX for Advanced & Expert Users

  Go Back    


UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

Physical disk IO size smaller than fragment block filesystem size ?

UNIX for Advanced & Expert Users


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-09-2013
rarino2 rarino2 is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 17 February 2013, 1:25 PM EST
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Sun Physical disk IO size smaller than fragment block filesystem size ?

Hello,
in one default UFS filesystem we have 8K block size (bsize) and 1K fragmentsize (fsize). At this scenary I thought all "FileSytem IO" will be 8K (or greater) but never smaller than the fragment size (1K). If a UFS fragment/blocksize is allwasy several ADJACENTS sectors on disk (in a disk with sector=512B), all "physical disk IO" it will allways, like "Filesystem IO", greater than 1K.

But with dtrace script from DTrace Toolkit (bitesize.d) I can see IOs with 512B size.

¿What is wrong in my assumptions or what is the explanation?

Thank you very much in advance!!

Last edited by rarino2; 02-10-2013 at 08:43 AM..
Sponsored Links
    #2  
Old 02-09-2013
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 27 November 2014, 8:24 AM EST
Location: NM
Posts: 10,283
Thanks: 288
Thanked 815 Times in 757 Posts
Suppose you open a file and write one byte to the file. You close the file. close() is required to update filesystem metadata, and sync the data in the file.

open() already allocated the minimum number of blocks specified as a filesystem parameter for minimum blocks per file/inode.

Those i/o's are very likely metadata (inode and directory) updates. What else is there left to do?
Sponsored Links
    #3  
Old 02-10-2013
rarino2 rarino2 is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 17 February 2013, 1:25 PM EST
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Jim! Thanks for your time.

I'm not sure to understand you well. When you say "blocks" in your post, are you speaking about physical (disk) blocks (sectors)?

If the answer to the above question is yes then, reading your answer, everything I have said in the first post is correct but I have not taken account FS metadata, access to which is not governed by the blocksize/fragmentsize. Right?

Than you very much!
    #4  
Old 02-12-2013
Praveen_218 Praveen_218 is offline
Registered User
 
Join Date: Feb 2008
Last Activity: 27 November 2014, 10:22 AM EST
Location: Linux Machines @Mumbai & Bangalore
Posts: 165
Thanks: 7
Thanked 28 Times in 26 Posts
Quote:
Originally Posted by rarino2 View Post
Hi Jim! Thanks for your time.

I'm not sure to understand you well. When you say "blocks" in your post, are you speaking about physical (disk) blocks (sectors)?

!
A block is still (on most FS) refers to 4K of data only.

On most system the page-cache is still of this fix sizes. Hence on all block I/O is of 4K or less. The file systems on such system utilizes the maximum size which is 4k.

However, if you see the disk architecture, they have been under trial by various vendors with various sector sizes; with 512bytes sector disk supported by most of the File system and storage product vendors (they however support various other size disks too -but 512b sector disk is in most common use probably because windows/DOS/UNIX FS supported them).

In order to support various disk architecture and FS supporting them use fragmentation which of course let you divide the 4k of page size into various fragments of 1, 2, ... 8 fragments per page.

8-fragments per page is the lowest value which translate into the size of a sector. You can of course not use a sector half of it. For I/O of 1 to full 512 byte of data a full sector gets used in one disk write.

Can you post here the steps you used to test this figures :
1) On UFS, how you saw the fragment size of 1 KB?
2) How did you looked at the 512kb I/O ?
Sponsored Links
    #5  
Old 02-17-2013
rarino2 rarino2 is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 17 February 2013, 1:25 PM EST
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Hello Praveen,
I'm not sure if you are mixing FS layer and phisical (disk driver) layer. I was speaking about FS layer (and block device driver layer) in my first post.

mcnamara answer was right.

Quote:
Originally Posted by Praveen_218 View Post
A block is still (on most FS) refers to 4K of data only.

On most system the page-cache is still of this fix sizes. Hence on all block I/O is of 4K or less. The file systems on such system utilizes the maximum size which is 4k.

However, if you see the disk architecture, they have been under trial by various vendors with various sector sizes; with 512bytes sector disk supported by most of the File system and storage product vendors (they however support various other size disks too -but 512b sector disk is in most common use probably because windows/DOS/UNIX FS supported them).

In order to support various disk architecture and FS supporting them use fragmentation which of course let you divide the 4k of page size into various fragments of 1, 2, ... 8 fragments per page.

8-fragments per page is the lowest value which translate into the size of a sector. You can of course not use a sector half of it. For I/O of 1 to full 512 byte of data a full sector gets used in one disk write.

Can you post here the steps you used to test this figures :
1) On UFS, how you saw the fragment size of 1 KB?
2) How did you looked at the 512kb I/O ?
1) fstype
2) dtrace script from DTrace Toolkit (bitesize.d)
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script to Compare file size and delete the smaller JC_1 Shell Programming and Scripting 6 08-03-2012 11:06 PM
block group size of a filesystem Pouchie1 UNIX Desktop for Dummies Questions & Answers 2 07-25-2009 05:21 PM
IPMI - Get physical memory size sncr24 IP Networking 0 05-18-2009 10:59 AM
determine the physical size of the hard disk hoffies HP-UX 4 11-15-2007 05:08 AM
How can I find the filesystem block size? progressdll AIX 4 10-06-2005 10:55 AM



All times are GMT -4. The time now is 11:59 AM.