Exchange uses its own database engine, and as such there are times that whitespace or space that has been freed by deleted mailboxes, emails, and other clean up functions, builds up.
Exchange by default does not compress its database, or remove the whitespace.
The whitespace is eventually used by new data, so the mailbox database size does not grow until it has to because it has used the whitespace.
There are a lot of times that I have found that I wanted to know which databases have the most whitespace so I know where to create new users to avoid expanding databases.
You can use the following command to display the Free space in each of the databases. Powershell will give you this data in a field called AvailableNewMailboxSpace:
Get-MailboxDatabase -Status | Sort-Object DatabaseSize -Descending | Format-Table Name, DatabaseSize, AvailableNewMailboxSpace
Now you can do defragment for the Databases and all the “AvailableNewMailboxSpace” will be free
Microsoft has introduced two new processes as part of the managed store concept:
1- First is the Store Worker Process(Microsoft.Exchange.Store.Worker.Exe) which does the same job that store.exe handled in previous versions. The only difference in 2013 is that a single Store Worker Process is only responsible for one database.
2- The second one is the Store Service Process(Microsoft.Exchange.Store.Service.Exe) & it is the process that controls the different store worker processes. When a database gets dismounted, it is the store service process which terminates the store worker process that was responsible for that database. Similarly, when a database gets mounted, the store service process brings a new store worker process for that database. The store service process is a controller of all the other store worker process
The Question is how to determine which store worker process handled a mailbox database
First I have 4 Mailbox Databases on my server as shown below:
Now , I have a single store service process and four worker processes.
Till now i couldn’t determine which worker process belong to which DB
So all you need is to get the Details Tab in the task manager and you will see the below
Now you know which Store Worker Process and its PID cause high CPU or Memory
Now you can run the below command and the result will show as below
Get-MailboxDatabase -Status | ft name, workerprocessid
Now that you have the store worker process & the process id from the task manager and database name & process id from the Shell, it is easy to find out which worker process is handling which database.
If you find that one store worker process is hot on CPU or memory, you can find the database behind it this way and take administrative action.