Hello,
I'm using an Informix database to store time series for an IoT platform.
The Informix instance has 4 CPU and 8 GB RAM. It stores 40 different databases.
The time series containers are configured to use 16K pages.
I did a performance test using the 8 GB of RAM and let the BUFFERPOOL automatically manage their memory. The onconfig parameters where the following:
- SHMTOTAL 8192000
- SHMVIRTSIZE 786432
- SINGLE_CPU_VP 0
- VPCLASS cpu,num=1,max=4,noage,autotune=1
- BUFFERPOOL default,lrus=8,lru_min_dirty=50,lru_max_dirty=60,extendable=1,start_memory=auto,memory=auto
- BUFFERPOOL size=2K,lrus=8,lru_min_dirty=50,lru_max_dirty=60,extendable=1,start_memory=auto,memory=auto
- BUFFERPOOL size=16K,lrus=8,lru_min_dirty=50,lru_max_dirty=60,extendable=1,start_memory=auto,memory=auto
During the test, I mainly query the databases through the following time series function: GetLastElem, GetClosestElem, PutElemNoDups, AggregateRange, select ranges of values through virtual tables.
To improve performances, I enable the huge pages. Here is my thought for the configuration of huge pages.
Based on my understanding and my tests, the huge pages can only be reserved by Informix at program startup.
So, I allocate 3000 huge pages of 2MB and configure the Informix (onconfig) with the same parameters as above except for BUFFERPOOL in order to be sure that they reserve a lot of their space on huge pages:
- BUFFERPOOL default,lrus=8,lru_min_dirty=50,lru_max_dirty=60,extendable=1,start_memory=auto,memory=auto
- BUFFERPOOL size=2K,lrus=8,lru_min_dirty=50,lru_max_dirty=60,extendable=1,start_memory=2490368,memory=auto
- BUFFERPOOL size=16K,lrus=8,lru_min_dirty=50,lru_max_dirty=60,extendable=1,start_memory=2555904,memory=auto
I get surprised by the results. The majority of the queries run faster by a factor of 30% except:
- select ranges through virtual tables: increase of 10% of the execution time;
- AggregateRange: increase of 250% of the execution time.
My second surprise is that now, the Informix instance use only 1 to 1.5 CPU out of the 4 allocated (the 4 were used without the huge pages). It seems that with huge pages Informix is no more able to use parallelism during queries execution.
Can someone explain to me why Informix reacts like this? Did I misunderstand how the huge pages work?
At the same time, could you, please, tell me if you have best practices in the allocation of huge pages for Informix (amount of huge pages to allocate, calculation of the values for the parameters SHMVIRTSIZE, BUFFERPOOL, ... in the case of huge pages)?
Thanks in advance for your help.
Regards,
Renaud
------------------------------
Renaud Demarneffe
------------------------------
#Informix