- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - OpenVMS
- >
- how to reduce directory size ?
-
-
Categories
- Topics
- Hybrid IT with Cloud
- Mobile & IoT
- IT for Data & Analytics
- Transformation
- Strategy and Technology
- Products
- Cloud
- Integrated Systems
- Networking
- Servers and Operating Systems
- Services
- Storage
- Company
- Events
- Partner Solutions and Certifications
- Welcome
- Welcome
- Announcements
- Tips and Tricks
- Feedback
-
Blogs
- Alliances
- Around the Storage Block
- Behind the scenes @ Labs
- Converged Data Center Infrastructure
- Digital Transformation
- Grounded in the Cloud
- HPE Careers
- HPE Storage Tech Insiders
- Infrastructure Insights
- Inspiring Progress
- Internet of Things (IoT)
- My Learning Certification
- Networking
- OEM Solutions
- Servers: The Right Compute
- Telecom IQ
- Transforming IT
-
Quick Links
- Community
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Contact
- Email us
- Tell us what you think
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Enterprise.nxt
- Marketplace
- Aruba Airheads Community
-
Categories
-
Forums
-
Blogs
-
InformationEnglish
how to reduce directory size ?
SOLVED- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-17-2003 09:19 PM
11-17-2003 09:19 PM
I want to reduce directoy size . I do NOT want to use backup/restore option. Here is an illustration for my problem:
1. I creat a directory testlj.dir whose initial size 1/4 (actual : 1 block, allocation: 4 blocks)
******************************************
DCCDT2> set def dsa2:[000000]
DCCDT2> creat/dir [testlj]
DCCDT2> dir/size=all testlj.dir
Directory DSA2:[000000]
TESTLJ.DIR;1 1/4
Total of 1 file, 1/4 blocks.
*****************************************
2. Now I increase the the directory size by running the following command procedure.
DCCDT2> set def [testlj]
DCCDT2> creat file.com
$loop:
$creat a.b
$creat b.c
$crea e.f
$creat c.d
$goto loop
$exit
Exit
DCCDT2> set noverify
DCCDT2> @file
Interrupt
DCCDT2> stop
DCCDT2> dir/size=all [-]testlj.dir
Directory DSA2:[000000]
TESTLJ.DIR;1 5/8
Total of 1 file, 5/8 blocks.
DCCDT2> dir
Directory DSA2:[TESTLJ]
A.B;49 B.C;49 C.D;48 E.F;49
FILE.COM;1
Total of 5 files.
DCCDT2> @file
Interrupt
DCCDT2> stop
DCCDT2> dir/size=all [-]testlj.dir
Directory DSA2:[000000]
TESTLJ.DIR;1 9/12
Total of 1 file, 9/12 blocks.
DCCDT2> purge
DCCDT2> dir/size=all [-]testlj.dir
Directory DSA2:[000000]
TESTLJ.DIR;1 5/12
Total of 1 file, 5/12 blocks.
DCCDT2>
**************************************
In the above example, now the directory size is :- 5 blocks actual & 12 blocks allocation size.
I want to reduce this allocation size back to 8 block ( cluster factor is 4 blocks)
Thanks & regards,
Lokesh
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-17-2003 09:48 PM
11-17-2003 09:48 PM
Re: how to reduce directory size ?
Re: how to reduce directory size ?
One way to accomplish this is to issue the following command (using your example above):
set file/truncate DSA2:[000000]TESTLJ.DIR
This should reduce file allocation size back to 8 blocks.
--Brad
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-17-2003 10:49 PM
11-17-2003 10:49 PM
Re: how to reduce directory size ?
Re: how to reduce directory size ?
I deduct from observations that the file system (XQP, to be exact) will locate new files based on a kind of hashing mechanism (correct me if I'm wrong). This _might_ mean that when a calculated slot within the directory-file is already occupied, it's very well possible that the new slot will be at the end of the directroy file - expanding it into the next cluster if needed.
For that reason, I doubt that limiting a directory's size is actullay useful, except you do not create any more files within it.
If you are so short of room on a disk, you definitely will run into trouble. Suppose you create a new file, and it will be placed at the end of the directory, it's possible the directory needs to be expanded into the next cluster. If no room is available at the curent disk-location, the file will have to be moved to a place on that disk that holds the whole allocated size as contiguous space. If that fails, you'll end up in an error. Or, expansion of the directory succeeds but there is too little room for the file to be allocated.
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-18-2003 12:54 AM
11-18-2003 12:54 AM
Solutionhttp://h71000.www7.hp.com/freeware/freeware50/dfu027a/
(NB DFU V3.0s due out RSN)
Note that directories should be kept below 127 blocks in size as there is a severe performance degradation above this size.
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-18-2003 02:40 AM
11-18-2003 02:40 AM
Re: how to reduce directory size ?
Re: how to reduce directory size ?
Why? Nothing better to do? What is the real problem you are trying to solve? What is the magnitude of the real directory (over) allocation you are addressing? You do knwo XQP/RMS will use the pre-allocated space for quicker future additions right? So shrinking is good for read-only directories, but the price to get is wrong is high!
Lokesh> I do NOT want to use backup/restore option.
Right. You don't want to because it is very wastefull, and potentially slow.
The VMS native sollution for this is RENAME.
This will NOT move the DATA, it WILL not create new files, it will just shuffle directory entries and tightly pack them as you go.
$CRE/DIR [.NEW]
$SET PROT NEW.DIR, DATA.DIR ! Allow delete access
$RENAME [.DATA]*.*;* [.NEW]
$RENAME DATA.DIR OLD.DIR ! Or delete
$RENAME NEW.DIR DATA.DIR
Lokesh> I increase the the directory size by running the following command
Lokesh> Loop: create a.b...
Creating mutliple versions of the same file is actually the most efficient, least space occupying method to store a file. It just adds a files-id and a little overhead to an array, based of the same name.
Next time, if you really want to explode a directory in a hurry make a loop with fresh,
It if you like creating work for the system, create them in reverse or random order.
long, filenames:
$loop:
$x = x=f$cvtime("",,"hundredth") + f$cvtime("",,"second")
$create 'x-get-creative-here.and-here
$if not-done then goto loop
Lokesh>
bradford> set file/truncate DSA2:[000000]TESTLJ.DIR
NO, IMHO it is NOT a good idea to truncate Directory files.
Use DFU, as Ian points out. Its great. best thing since sliced bread and all. Check out it's other functions (fragmentation report, quick file searched). It will soon ship with VMS.
Willem> _might_ mean that when a calculated slot within the directory-file is already occupied, it's very well possible that the new slot will be at the end of the directroy file
Close, but no cigar. Directory records are in strict sequential order. Use DUMP/RECO or DUMP/DIRECTORY to visualize. There is NO hashing on disk, but the XQP builds a little in memory table based on the first few characters (so don't pre-pend fluff!).
There is indeed a notion of name ranges for a BLOCK in a directory, trying to fit a new name in a logical spot. If that block is full, the whole directory will be re-copied opening up a block. This USED to be done with single block IOs as an easy way to garantuee recoverability.! (pre 7.2).
Ian> Note that directories should be kept below 127 blocks in size as there is a severe performance degradation above this size.
This is still agood guideline, but it never really was a hard and fast rule. It was there because RMS had a 127 block max size for (repeated) WILDCARD lookup ( mail$*.mai). Individual file lookup, without wildcard were/are done by the XQP with a modified binary search algoritme. RMS can now (7.2+?) deal with larger directories, making the performance 'knee' much softer. But exsessive directory sizes still hurt some.
hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-19-2003 09:24 PM
11-19-2003 09:24 PM
Re: how to reduce directory size ?
Re: how to reduce directory size ?
Regards,
Lokesh
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2018 Hewlett Packard Enterprise Development LP