# A Performance Evaluation of In-Memory Databases Operations in Session Initiation Protocol
## 6 Results and Discussion
### Single Client  
Figure 2 shows the impact of key-value databases on OpenSIPS servers when it performs read (fetch) operation during call testing. Obviously, we can notice that the Local database consumes less memory than the Memcached and Redis, which is due to the high integrity between the OpenSIPS server and its own local database. However, the Local cache has a main structured drawback, which is persistency. The Local-database will lose the entire amount of data whenever the OpenSIPS server fails or restarts. Memcached comes second in this evaluation as it hits 6.61% of the memory due to OpenSIPS dealing with a very simple data structure suitable for Memcached. For overall load, Redis utilized the highest memory footprint. With the \"store\" operation, OpenSIPS aims to store some values in the in-memory database for current calls in real time, for instance, storing user passwords during registration. In all database structures, writing in the disk/memory requires extra effort compared to read operation. The reader can notice from Figure 3 that the three databases consume extra memory. Again, the Local database has higherperformance than others, with the same reason of read operation; Local database is a local special database for OpenSIPS. The memcached bar shows that the 0.56% of extra memory goes to writing operation and 0.58% in Redis. The throughput in the OpenSIPS server is measured based on the amount of network data being received for a period of 1 s. Clearly notice from Figure 4 that the Local database gains a high amount of data while processing fetch data, and 35.91 KB/s is the highest amount of data received in this process compared to other databases. This is due to the high integration and interoperation between the Local database in shared memory (shmem) and the OpenSIPS server. Memcached causes the OpenSIPS server to gain only 32.20 KB/s while reading data. This means that the reading process consumes extra reading time operation and made the OpenSIPS server slow in receiving data. Despite the high features and data structure support, Redis performs with lower throughput as the memory structure requires a higher footprint for data. The write operation in Figure 5 shows the decrease of data received from UAC as the location server requires extra effort to store UAC user name and password. Memcached and Redis both received around 25 KB/s, which is not too much different from read operation. In fact, the write operation costs the server a delay by receiving 7 KB/s in the Local database; in reality, this is still an acceptable difference  
Figure 3: Memory usage with write operation (Single Client). Figure 2: Memory usage with read operation (Single Client). in real time as this only happened during the user registration session and not calling. In real-time communication, user experience is only noticed during the lexchanging of voices end to end. In other words, during the registration session, a user does not care much about the registration delay as it only occurred once. It is worth mentioning in this stage that the data received (throughput) are the SIP signaling messages such as INVITE, ACK, and BYE. Media (RTP) data are not processed and received in this research as it is out of the scope. Figure 6 presents the period of time spent on a round trip call, in particular, the time taken to complete a successful call session starting from the UAC, SIP server, and UAS, then backward to the source again. When it comes to a millisecond, there is a silly difference between the three databases; between Local and Memcached, it is less than one millisecond. This, in fact, is attributed to the power of the OpenSIPS engine, a scalable and fast server. Redis performs in a very close response time compared to Local and Memcached. Interestingly, results can also be seen from Figure 7, when store operation only delays the call with 0.012 ms for a Local database, 0.028 ms for Memcached, and 0.048 ms in Redis, which is the highest.