Operating System - HP-UX
1834637 Members
2885 Online
110069 Solutions
New Discussion

Re: Does FS blksize impact storage??

 
SOLVED
Go to solution
Tim Medford
Valued Contributor

Does FS blksize impact storage??

I usually create Oracle filesystem with an 8K blocksize for performance reasons.

newfs -F vxfs -b 8192 etc...

If I have a filesystem however, that consists of many small files (most less than 8K in size) am I wasting space by going with an 8K blocksize on this one?

I thought I heard at one time that the system uses a minimum of 1 block to store a file? So in other words, a 5k file would occupy an 8K block and the rest of the space cannot be re-used, thus wasting 3k?

Is this true?

Thanks!
4 REPLIES 4
Bruce Regittko_1
Esteemed Contributor
Solution

Re: Does FS blksize impact storage??

Hi,

Yes, if you have a 1K file on a vxfs filesystem with 8K blocks, then you will "waste" 7K. Also, when reading the same 1K file, the entire block will be read even though only 1K is needed.

By default, newfs -F vxfs will create the filesystem with 1K blocks.

--Bruce
www.stratech.com/training
Ed Ulfers
Frequent Advisor

Re: Does FS blksize impact storage??

For Oracle database datafiles, a file system block size closer to the Oracle "db_block_size" value will increase HP-UX performance with Oracle.

For the Oracle executables and administration files as well as other miscellaneous files, this is a judgement call for the system admin. If I plan for many small files, I would try to keep the block size small (e.g., 1K).

Maximizing performance requires evaluating each need individually for their best interest (usually requiring understanding how the application utilizes the system resources). It is more work, but I have not found "generic" settings that maximizes all desired effects for all types of different needs.

Hope this helps.
Put a smile on your users face, offer them a kiss (Hershey's Kiss).
Stefan Farrelly
Honored Contributor

Re: Does FS blksize impact storage??

Yes, you must decide between performance and wasting disk space.

Either you set your fs blocksize to the same as the oracle db (eg 8k, 16k, 32k) and gain ~15%+ performance but waste quite a lot of space if you have lots of small files on that filesystem also, or set it to 1k, save space but dont get the performance increase.

For this reason we usually have separate filesystems for oracle indexes and dbf files only, which are set to 8k+. And other filesystems with the default 1k for all those small files.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Tim Medford
Valued Contributor

Re: Does FS blksize impact storage??

Thanks guys. I'm going with 8192 on all File systems that contain Oracle .dbf files and the default 1K on the rest.

Tim