{'fraction_non_alphanumeric': 0.020708082832331328, 'fraction_numerical': 0.0026720106880427524, 'mean_word_length': 5.0894308943089435, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An Empirical Study on Memory Sharing of Virtual Machines for Server Consolidation

Server consolidation presents numerous opportunities for sharing memory between virtual machines. To intelligently share RAM across VMs, modern hyper visors use a technique called content-based page sharing (CBPS), in which duplicate copies of a page resident on a host are detected and a single copy of the page is shared, thereby reducing the memory footprint of resident VMs. One widely used implementation of content-based page sharing is kernel same page merging (KSM). In this paper, we conduct empirical study on the effectiveness of KSM on various kinds of workload through extensive experiments. We classify memory sharing into two classes: static sharing for memory sharing after launching the VM and before executing the application, and dynamic sharing for memory sharing during the execution of the application. We found that KSM achieves very effective static memory sharing for various workload, evidenced by its ability to consolidate 50 Windows VMs on one physical machine. KSM achieves most significant memory saving for mixed CPU and I/O workload. For CPU-bound applications, the effect of KSM on dynamic memory sharing is not as significant and it also causes higher runtime overhead. For I/O-bound applications, dynamic memory sharing reduces memory use by around 50% with very little runtime overhead. Furthermore, KSM has more significant effect on Windows based VMs than on Linux based VMs.