Just had an instance where a customer running Lotus Domino R8.5.2 had a program document running a nightly Compact -b -S10
The compact -b is the recommended option or switch for Domino Servers running Transactional logging as per quote from the help file below:
Uses in-place compacting and recovers unused space without reducing the file size, unless there’s a pending structural change to a database, in which case copy-style compacting occurs. This is the recommended method of compacting.
However, this was not reducing space at all. The server was running the Compact OK but was reporting Zero Bytes recovered. Very strange.
We changed the switch to Compact -B -S10 and lots and lots of data was recovered.
Wonder whats up with the -b option. Anyone else found this ?
Jesper Kiaer says:
I think it does exactly what the documentation says:
-b
“Uses in-place compacting and recovers unused space without reducing the file size, unless there’s a pending structural change to a database, in which case copy-style compacting occurs. This is the recommended method of compacting.”
-B
“Uses in-place compacting, recovers unused space and reduces file size, unless there’s a pending structural change in which case copy-style compacting occurs. If you use transaction logging, do full database backups after compacting completes”
brgds Jesper Kiaer
Selcuk Ayguney says:
Hi,
This behavior is as documented. According to the admin help:
-b: Uses in-place compacting and recovers unused space without reducing the file size
-B: Uses in-place compacting, recovers unused space and reduces file size
In my experience, -b option does nothing except that it does check if the database needs a copy-style compaction.
Steve Medure says:
Compact -b has been that way for a long time. I’ve never seen it recover space, at least from what the console reports. Here is a response I got from IBM support;
When COMPACT -b runs on a mail file, or indeed any DB; rather than decrease the size of the DB, this Lotus recommended “purge” increases white space and decreases the percentage of the file used. Simply put, compact -b reorders data in a database so that the data is consecutive. The % Utilization goes up while space is compacted within the NSF structure. The file size remains the same. By defragmenting the DB, the white spaces become a single large “white space” and thus we now have room for larger incoming items, mail, attachments etc. This new incoming “data” we can now accommodate within the existing DB without having to “expand” the DB by adding additional new blocks to the end. The DB will gradually again becomes more fragmented through use. As random records (notes) are deleted creating smaller white space holes, the DB becomes increasingly fragmented. Consequently larger incoming notes and files, attachments etc, will no longer fit within any spaces inside the DB, and so the DB must expand itself. Thus frequent defragmentation is required to keep the white space in a usable, contiguous form as much as possible.
So compact -b is more like a defragment rather than a recovery of physical space.
Darren Duke says:
“recovers unused space without reducing the file size”
With -b look at the free space database property (% used) before and after the compact.
Steve Davis says:
-b does not reduce file size, but -B does. From Notes Administrator help:
In-place (recommended) -b Uses in-place compacting and recovers unused space without reducing the file size, unless there’s a pending structural change to a database, in which case copy-style compacting occurs. This is the recommended method of compacting.
In-place with file size reduction -B Uses in-place compacting, recovers unused space and reduces file size, unless there’s a pending structural change in which case copy-style compacting occurs. If you use transaction logging, do full database backups after compacting completes.
Nathan Chandler says:
I think it’s fixed in 8.5.2 FP1
http://www-10.lotus.com/ldd/dominowiki.nsf/dx/8.5.2_FP1_Fix_List
SPR# KHAN86WTVS : Fixed a problem with inplace size calculation stats for databases greater than 4 GB.
Nathan Chandler says:
By the way I found this article which expands on what you mentioned above:
http://www.bleedyellow.com/blogs/LotusLand/entry/compact_b_vs_compact_b_an_email_from_ibm2?lang=en
Steven Vaughan says:
Thanks for you replies Nathan. Much appreciated.
Syed Jahanzaib says:
Sorry to wake very old thread. but i am unable to get any reply for this issue.
I have domino 8.5.3 FP6 with transactional logs enabled.
with -a , it only archive but does not reduce file size.
with -B, it does reduce file size.
So can I use ” load compact -a -B mail\ ” together? any negative impact of running it altogether?
Steven Vaughan says:
Hey Syed,
If you are using Transaction logs for incremental backups then the -B switch changes the DBIID so you need to ensure a full backup is taken.
From the technote below, and I’m assuming that a compact -B will be OK to use, I’d go with the -A -B switches
http://www-01.ibm.com/support/docview.wss?uid=swg21084388
Thanks for posting and I hope this helps you out,
Steven.