How do salesforce calculate data storage?
We recently had a problem where the storage usage in one of our salesforce orgs hit 120%. The strange thing was that there were no email notifications, and we were able to continue creating records. This goes against what salesforce.com state, which is:
What happens if I approach or reach my storage limits ?
“Once an organization reaches 90% of its storage limit, an email notification is sent every week to its system administrator(s).
Orgs that reach 95% of their capacity will receive warning emails that are typically delivered on Sunday. Those that reach 105% capacity will receive a daily email notice, and you won’t be able to create new records in your organization until your storage usage lowers.”
After taking a closer look at the storage usage (Setup | Administration Setup | Data Management | Storage Usage) I could see the problem was specifically with Tasks. We had 360k tasks, but these were apparently taking up 4Gb of data storage. I extracted all task records using the data loader into a 130Mb csv file – 30 times smaller! I appreciate that you can’t compare flat file storage like-for-like with database storage, but a 30 fold increase seems a little extreme!
I did some research and found that for each salesforce object, the storage is calculated or computed (per record or row) as follows:
All Standard Objects (except those below) = 2kb Campaign = 8kb Person Accounts = 4kb Documents & Attachments = Actual size
Note: Salesforce calculate data storage at 2kb per record even when using long text fields (which can store up to 32kb).
Another thing to be aware of (especially when uploading large volumes of data through import wizard or data loader) is that the storage usage page may not actually reflect the true size of your data – it is not a ‘real time’ view. There is a process that salesforce.com run in the background to recalculate the true figures… I’m not sure how often this actually runs but salesforce say ‘a few minutes’ – give it 10-15 and it should be up to date.