Solved

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

Posted on 2007-11-25
5
676 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

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.
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…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

803 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