Knowledgebase: Email Manager
Mailbox disk usage overhead varies?
Posted on 16 January 2005 05:18 PM
I currently have 5 empty POP3 mailboxes (0 new, 0 unread, 0 read), with disk consumption of 16kB, 92kB, 168kB, 808kB, and 108kB. Why would 5 (seemingly identical) empty mailboxes have such widely varying overhead totals?
Each of your POP boxes has a storage structure on the server:
The way Linux works is that when you fill up a directory, the size of the directory itself increases. Think of writing down all the contents of your home on to 10 sheets of paper, then you have a garage sale and sell off 100 of your possessions. You would strike those items off your inventory sheet, but you would not destroy the inventory sheet itself (it may have entries to other items). This is what happens when you delete a file from a directory, although the file is stricken from the list, the page that you wrote it on is still allocated.
With the spam box, you may have had a lot of messages in there, which were tracked by the directory itself. When you deleted the messages (POP'd them), the storage size of the files was removed, however the directory page itself did not shrink. This is for efficiency, because creating directory pages is expensive, therefore it is better to keep the allocated directory pages, than it is to throw them away. The notion being that if the directory had that many files at one time, there is a good probability that it will contain that many files once again in the future.
The above is why a POP email account may show 0 KB in stored email and reflect different values as far as the overall usage by that email account.