- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Disk Fragmentation
Operating System - HP-UX
1820396
Members
3200
Online
109623
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2001 01:24 PM
тАО04-05-2001 01:24 PM
I saw a note about how to defragment a disk on the forums today and it got me thinking... How often should you defragment your disks? Is it really a performance issue? I noticed some documents that suggest fragmentation does not significantly affect performance. I'm a little suprised by this, so I figured that I'd ask you.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2001 11:07 PM
тАО04-05-2001 11:07 PM
Re: Disk Fragmentation
I thought I cut & paste the important section from the fsadm_vxfs manual page:
Defragmentation
For optimal performance, the kernel-extent allocator must be able to
find large extents when it wants them. To maintain file-system
performance, fsadm should be run periodically against all VxFS file
systems to reduce fragmentation. fsadm should be run somewhere
between once a day and once a month against each file system. The
frequency depends on file system usage and activity patterns, and the
importance of performance. The -v option can be used to examine the
amount of work performed by fsadm. The frequency of reorganization
can be adjusted based on the rate of file system fragmentation.
There are two options that are available to control the amount of work
done by fsadm. The -t option is used to specify a maximum length of
time to run. The -p option is used to specify a maximum number of
passes to run. If both are specified, the utility exits if either of
the terminating conditions is reached. By default, fsadm will run 5
passes. If both the -e and -d options are specified, the utility will
run all the directory reorganization passes before any extent
reorganization passes.
If you have a very static filesystem, where not many files are created/removed or change in size, the intervals can be longer.
The easiest is to check the fragmentation by running:
# fsadm -F vxfs -D -E
This gives a report on your fragmentation. To perform the defragmentation you run
# fsadm -F vxfs -d -e -D -E
This works only with the Advanced JFS product.
Carsten
Defragmentation
For optimal performance, the kernel-extent allocator must be able to
find large extents when it wants them. To maintain file-system
performance, fsadm should be run periodically against all VxFS file
systems to reduce fragmentation. fsadm should be run somewhere
between once a day and once a month against each file system. The
frequency depends on file system usage and activity patterns, and the
importance of performance. The -v option can be used to examine the
amount of work performed by fsadm. The frequency of reorganization
can be adjusted based on the rate of file system fragmentation.
There are two options that are available to control the amount of work
done by fsadm. The -t option is used to specify a maximum length of
time to run. The -p option is used to specify a maximum number of
passes to run. If both are specified, the utility exits if either of
the terminating conditions is reached. By default, fsadm will run 5
passes. If both the -e and -d options are specified, the utility will
run all the directory reorganization passes before any extent
reorganization passes.
If you have a very static filesystem, where not many files are created/removed or change in size, the intervals can be longer.
The easiest is to check the fragmentation by running:
# fsadm -F vxfs -D -E
This gives a report on your fragmentation. To perform the defragmentation you run
# fsadm -F vxfs -d -e -D -E
This works only with the Advanced JFS product.
Carsten
-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2001 01:02 AM
тАО04-06-2001 01:02 AM
Solution
Hi,
Carsten told how to use fsadm for defragmentation. The man page of fsadm also gives some hints on decision when it is worth to defragment and when not based on calculated values by fsadm. Actually, I didn't make tests to see when performance does increase or not before and after defragmentation. I do defragmention of filesystems twice a year, immediately after creating complete system backups.
If you decide doing defragmentation you should be sure having the latest fsadm patches with all its patch dependencies (including the newest patches dealing with vxfs or hfs) installed/configured on your system. (About two years ago, I had to re-install my system after trying to defragment without having installed the latest relevant patches.) In addition, you should create complete and working system backups before starting any defragmentation.
Regards,
Thomas
Carsten told how to use fsadm for defragmentation. The man page of fsadm also gives some hints on decision when it is worth to defragment and when not based on calculated values by fsadm. Actually, I didn't make tests to see when performance does increase or not before and after defragmentation. I do defragmention of filesystems twice a year, immediately after creating complete system backups.
If you decide doing defragmentation you should be sure having the latest fsadm patches with all its patch dependencies (including the newest patches dealing with vxfs or hfs) installed/configured on your system. (About two years ago, I had to re-install my system after trying to defragment without having installed the latest relevant patches.) In addition, you should create complete and working system backups before starting any defragmentation.
Regards,
Thomas
no users -- no problems
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2001 01:23 AM
тАО04-06-2001 01:23 AM
Re: Disk Fragmentation
I tend to agree with Thomas, especially concerning the backup and patch strategy. Personally I wouldn't run the defragmentation on the standard HPUX filesystems (/, /opt, /usr, /var) as these are really static.
Another caveat is that the filesystem should not be full (100% usage), as defragmentation requires some free space for the defragmentation operations (copies basically).
We often found it necessary to run fsadm -d -e on active filesystems, specifically we ran directory defragmentation (fsdam -d) on growing filesystems (in terms of number of files or file size), such as /usr/sap/trans on an SAP/R3 system. The reason is that directory inodes grow slowly and allocate one extent after another. Since they grow so slow, the extents are not allocated in sequential order on the physical disk, but are widely distributed. If not defragmented reading the directory inode can consume a lot of time!
Carsten
Another caveat is that the filesystem should not be full (100% usage), as defragmentation requires some free space for the defragmentation operations (copies basically).
We often found it necessary to run fsadm -d -e on active filesystems, specifically we ran directory defragmentation (fsdam -d) on growing filesystems (in terms of number of files or file size), such as /usr/sap/trans on an SAP/R3 system. The reason is that directory inodes grow slowly and allocate one extent after another. Since they grow so slow, the extents are not allocated in sequential order on the physical disk, but are widely distributed. If not defragmented reading the directory inode can consume a lot of time!
Carsten
-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP