Operating System - HP-UX
1834476 Members
2960 Online
110067 Solutions
New Discussion

Re: Defragmentation utility on jfs

 
SOLVED
Go to solution
Roberto Gallis
Regular Advisor

Defragmentation utility on jfs

I have xp256 and big filesystem with advanced jfs...
doing defragmentation of that filesystem is usefull or not? Is it possible to do that online?
Thanks
Regards

Roberto
6 REPLIES 6
MARTINACHE
Respected Contributor
Solution

Re: Defragmentation utility on jfs

Hi,

Here are some "Student Workbook" lines :

Because block are allocated and deallocated as files are added, removed, expanded and truncated, block space can become fragmented. this can make it more difficult for JFS to take advantage of the benefits provided by a contiguous extent allocation.

the fsadm utility will bring the fragemented extents of files closer together, group them by type and frequency of access.


fsadm -F vxfs -D /mountpoint : report on directory fragmentation

fsadm -F vxfs -E /mountpoint : report on file extent fragmentation

fsadm -F vxfs -d /mountpoint : directory defragmentation

fsadm -F vxfs -e /mountpoint : file extent defragmentation

If your mountpoint contains oracle datafile, defragmentation is unuseful.

regards,

Patrice.
Patrice MARTINACHE
Roberto Gallis
Regular Advisor

Re: Defragmentation utility on jfs

I understand.. thanks
but why for oracle files is unuseful to make defragmentation?
Frederic Soriano
Honored Contributor

Re: Defragmentation utility on jfs

There is no fragmentation on an Oracle database. The files do not change size and files are seldom created or removed.

Bests,

Fred.
Dan Hetzel
Honored Contributor

Re: Defragmentation utility on jfs

Patrice, Frederic,

It is not always true that filesystems containing Oracle files don't need to be defragmented.

If any of your datafile has the AUTOEXTEND flag turned on, it could become fragmented.

Best regards,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Dave Wherry
Esteemed Contributor

Re: Defragmentation utility on jfs

You can certainly get fragmentation in your table spaces. However it will not fragment at the file system. Say you add a new 1GB table space. That creates a 1GB file. That does not change. In that file Oracle writes, deletes, modifies.... That can get fragmented. The file from the file system point of view does not change.
You can degragment within Oracle and that is a worthwhile task.
Tim Malnati
Honored Contributor

Re: Defragmentation utility on jfs

With the optional online jfs product you can defragment anytime. But the question as if is worthwhile or not is dependent on your data files. If the SIZE of the files changes a lot or if the system is continually adding and deleting files, you will probably have a significant gain. Most of the database engines experience a lot of changes within their files but most of them grab a block of data, make any necessary changes, and then put the block right back to the same location.

One of the bigger causes of fragmentation is running a file system near it's upper limits. If you attempt to create a large file and the file system is up past 90% there is a good chance that there isn't a contiguous space available for your file to be created unfragmented.

I typically set a cron job to defragment the root file system areas one a month (usually mid-month). In data areas that change as I've noted above, I again process these monthly after all the end of month processes have completed and a full backup is done. A while back some people were suggesting some horror stories, but I have not seen any. Again, it's a good idea to have your backups completed before you start and you certainly don't want to be fighting large amounts of i/o that may be processing from normal system activity.