You can quickly estimate the amount of storage needed to hold all the active View State sessions by taking samples of your Web pages multiplying by your amount of traffic. The size of each View State on the page depends on how efficient your Web site was programmed as well as the configuration of your Web site.
- Enable Page trace on the Optimizer to display the View State size at the bottom of each page.
- Select the frequently visited pages and take the average View State size of the pages.
- Multiply the average View State size by the average number of page views per day. You can find out your average page views by looking in your own Web tracking reports. You may want to use the peak values to calculate worst case scenario.
- Multiply the final value by the View State duration and divide by 1440 minutes. This will give you the active storage size needed.
Avg. active storage = Avg. View State size x Page views per day x Duration ÷ 1440
For example, if my average View State size is 50 KB and my site receives 10,000 page views per day and I configured the Optimizer duration to discard old View States every 20 minutes, I can expect on average to store about 6,944 KB (approximately 7 MB) of active View State data at any time. In this case, it's a relatively small number, therefore I can choose to store the View State in memory since I know I have sufficient memory.