The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Dymamic resizing of a window MarkSeger Linux 1 04-05-2008 12:33 PM
Resizing VG with mirror chrispaz AIX 1 08-22-2007 07:19 AM
Resizing File-Systems TRUEST UNIX for Dummies Questions & Answers 4 07-08-2003 11:16 AM
resizing slices dangral UNIX for Dummies Questions & Answers 5 12-18-2002 12:14 PM
filesystems resizing sshokunbi UNIX for Advanced & Expert Users 10 02-08-2002 11:21 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 01-20-2004
Registered User
 

Join Date: Jan 2002
Posts: 144
Resizing file

is there anything such as "resizing file for optimal disk usage"

if so, whats it about?
Forum Sponsor
  #2  
Old 01-20-2004
jsilva's Avatar
Registered User
 

Join Date: Apr 2003
Posts: 169
Hi,

I'm going to try to explain with an example...
If you have a file of 2049 bytes and if each block has a size of 2048 bytes, that file will occupy 2 blocks, wasting 4096-2049 bytes... got it ? With this in mind, if you have thousands of small files with a little more of 2048 bytes, you can try to reduce them and get some free disk space...
  #3  
Old 01-20-2004
Kelam_Magnus's Avatar
Registered User
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
good example Jsilva.


This is really about determining what type of data you have on a particular filesystem... On systems with large amounts of data you will see the real impact of proper sizing of blocks.

However, In HPUX we dont use block size, we use extent-based sizing. All of our extents are divisible by 4mb... 4/8/12/16 etc... upto 256mb extents...

Many Filesystems in HPUX with mounted databases, use 64/128 for the extent size. My DBAs had me make my stripesize to 128mb b/c of the characteristics of their data.

The other thing about choosing the correct extent or block size is so that your number of writes are fewer...

If you have chunks of data... a small block size can be equally detrimental... causing you to have many more writes to those smaller blocks.

Choosing the right size is very important... Many vendors have recommendations that you can use to help determine what is right for your system.
__________________
My brain is your brain
  #4  
Old 01-21-2004
Registered User
 

Join Date: Jan 2002
Posts: 144
Quote:
Originally posted by jsilva
Hi,

I'm going to try to explain with an example...
If you have a file of 2049 bytes and if each block has a size of 2048 bytes, that file will occupy 2 blocks, wasting 4096-2049 bytes... got it ? With this in mind, if you have thousands of small files with a little more of 2048 bytes, you can try to reduce them and get some free disk space...

thank you

but how do you go about reducing them. what command?

does this involve editign the file with vi or cutting it with wc???
  #5  
Old 01-21-2004
jsilva's Avatar
Registered User
 

Join Date: Apr 2003
Posts: 169
Quote:
Originally posted by TRUEST
but how do you go about reducing them. what command?
Compress them with zcat, gzip, compress, zip...

Quote:
does this involve editign the file with vi or cutting it with wc???
If you have text files, you can edit them, just delete the lines you don't want... but it's a tedious job ! Compressing the files will be easier, cleaner and faster !
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:59 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0