Solved

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

Posted on 2007-11-25
5
680 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 40

Expert Comment

by:omarfarid
ID: 20346215
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
ID: 20346246
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
ID: 20346279
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
ID: 20346495
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
ID: 20346513
You are welcome :)
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

696 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