Solved

What is significance of the block size of each 4k and  8k , in Linux operating system

Posted on 2007-11-25
5
672 Views
Last Modified: 2013-12-16
Dear experts,
I bit unclear in the idea on the block size of operating system. What is significance of each block size concept in the operating level? What is benefit having higher block size than lower?
Please elaborate in this respect.


Thanks for all in advance.
0
Comment
Question by:mansur_mca
  • 3
  • 2
5 Comments
 
LVL 40

Expert Comment

by:omarfarid
Comment Utility
Hi,

When a file is created it is allocated a block. The file data is written to this block till it is full and then another block is allocated, and so on.

If small (say 1k files) files are created on a file system, then a small block size is better since if the block size is big, you will have less blocks to allocate and hence less files can be created on the file system.

If small files are created on a big block size file system, then space is wasted or the file system will accommodate more than one file in a block (this is called fragmentation) and the overhead will be high in managing such blocks and files.

The block size has impact over the performance of the system.

In general, if you expect to have large number of small files, then have a small block size on the file system. If you expect big files then have a big block size.

Please see

http://www.docs.hp.com/en/B3929-90011/ch05s02.html
http://en.wikipedia.org/wiki/Comparison_of_file_systems
http://www.linfo.org/get_block_size.html
http://www.sunmanagers.org/archives/1999/0242.html
http://www.ixora.com.au/tips/buffered_block_size.htm
0
 
LVL 1

Author Comment

by:mansur_mca
Comment Utility
exellent omarfarid ... reacting so soon .
In the modern computing most of the organisations recommanding for 8k rather 4k.  
I am just wondering ,is this irrespective of their requirement how  all widly opting for 8k than 4k.  can you share you  view on this ...

thanks for ur understanding ...
0
 
LVL 40

Accepted Solution

by:
omarfarid earned 125 total points
Comment Utility
Hi,

Well it depends on the nature of your system and the size of the files that will be created on the file system.

e.g.

If your files sizes is in the range of 2 to 4K, then it will be faster to write and read if the block size is 4k.

If you have large files then 4k blocks will make it more writes and reads when you create the file and read it.

If you have files is MBs then it could larger block sizes since reading will be faster.

It all depends on your needs and nature of your system. Most of the books / guides recommend block size of 4/8k, while I have seen 32k block sizes.
0
 
LVL 1

Author Comment

by:mansur_mca
Comment Utility
i impressed the way that you have answered the query.
experts like you are more valuable for this community . keep this journey going ....  hope we meet in next question
0
 
LVL 40

Expert Comment

by:omarfarid
Comment Utility
You are welcome :)
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

More or less everybody in the IT market understands the basics of Networking, however when we start talking about Storage Networks, things get a bit dizzier, and this is where I would like to help.
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now