Ever wondered what’s the actual size on disk that a list item takes?
It might be useful fact to know when planning for capacity, or investigating free space issues.
Well.. If we think about it, a list item is just a row in the database.. isn’t it? Actually.. maybe it’s a few rows in different tables.. Wait, what about the item’s fields..?
Coming to think bout it, this method of calculating the different parts of a list item is too complicated. We need another method.
I actually used a different one. I used the StorageManagementInformation method of the SPSite object.
I used it do get an exact measurement of the size of lists in my site.
These were my findings: (for lists with 0 items)
|List Type||Size of list (in Bytes)||Size of list (in Kb)|
It was interesting to see that not all lists were created equal, but that’s not the goal of this post.
For the rest of this study, I decided to concentrate on a list of type “Custom” (a custom list).
Now, that I had the basic numbers, I went ahead and added items to my custom lists.
I created an item, with one char in it’s title, then added one more char… and so on.
These were my findings:
|# of chars in Title||Size of list (in Bytes)|
Which brings me to the conclusion that a single item takes 30 Bytes, and each additional character takes 2 more bytes.
Adding more items and more characters confirmed my findings, and provided a predictable way to calculate the item’s size.
Adding more fields to the list didn’t added additional size to the list items, but each char inside them added those 2 additional bytes, naturally.
Next step was to see how other type of fields behave.
I decided to concentrate on 3 field types: Text, Number, and Date. I noticed that field types such as Number and Date, are not effected by their content. Probably they reserve a specific amount of space in advance.
|Field Type||Size (in Bytes)|
|Single line of text||2 (Per char)|
For conclusion, we now know some facts and numbers that can help us make size calculations. We know what is the base size of an empty list. We know how much each item costs us, and how much for a field.
We also know that StorageManagementInformation is an easy method to determine the size of lists.