Active Directory database can be optimised by defragmenting it. Active Directory normally does an online defragmentation but doing an offline one can recover space in the database. The tool used for offline defragmentation is Ntdsutil.exe
To run a offline defragmentation firs stop the services or enter DSRM. Then run the following:
Ntdsutil.exe
activate instance ntds
files
compact to “<location>”
quit
quit
(Image)
Once the Database has been compacted