Estimating memory requirements of a database
A database requires physical memory (RAM) and disk space. The following gives more information about these requirements.
RAM usage
Generally the database uses [(2*(cache size) + 325)*(number of items)] bytes of RAM for each item. Although the database can function using virtual memory, the speed is considerably improved using physical memory. E.g.: the default cache size of 10040 bytes and 10000 sampled items, gives a RAM usage of approx. 195 MB. Though, since the operating system as well as other applications uses memory, this number of bytes is only meant as a guideline when configuring the hardware. As a rule of thumb, when it comes to RAM, it's better to have too much rather than too little.
Disk usage
Disk usage is generally linear with the trend horizon and item size. E.g. an item with data type "32 bit floating point", sampled with quality, at a resolution of 60 seconds, and a history length of one year, will occupy approximately [(4+4)*60*24*365] 4 MB of disk space. If data compression is used, the space required can be considerably reduced. Typically, Apis Honeystore compress data 10 - 20 times, depending on the variation of the data stored. Worst case compression is approx. 2 times. For a database of 10000 such items, the total disk capacity requirements will be: 40 GB uncompressed, and typically 4 GB compressed. When specifying the size of your disk drives, remember that disks that are close to their capacity slow down, showing poor capacity. Typically, you always want a minimum of 10 % free disk space.