?
Solved

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

Posted on 2007-11-25
5
Medium Priority
?
683 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 375 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

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

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

INTRODUCTION The purpose of this document is to demonstrate the Installation and configuration, of the HP EVA 4400 SAN Storage. The name , IP and the WWN ID’s used here are not the real ones. ABOUT THE STORAGE For most of you reading this, you …
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month12 days, 23 hours left to enroll

777 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