CCoW: Optimizing Copy-on-Write Considering The Spatial Locality in Workloads Part 5
Apr 03, 2024
4. Evaluation
This section reports the evaluation results of the proposed CCoW scheme. We implemented CCoW in the Linux Kernel v5.7.7, and it took approximately 400 lines of code. The evaluation was performed on a server with one Intel Xeon Gold 5215 CPU and 128 GB of memory.
The relationship between assessment results and memory has always attracted much attention. Research shows that good assessment results are closely related to excellent memory.
On the one hand, good assessment results require repeated learning and mastering of knowledge points and a high degree of understanding and in-depth mastery. These require good memory support. Especially in exams, candidates need to respond quickly and answer questions correctly and quickly in a short period, which requires excellent memory as a basic support. Only with excellent memory can you perform your best under pressure.
On the other hand, good assessment results can also promote memory improvement. When we get excellent assessment results, we will feel a sense of accomplishment and satisfaction. These positive emotions have a positive impact on our memory and learning. A good emotional state can promote the connection and information transmission of nerve cells in the brain, thereby improving memory.
To sum up, there is a mutually reinforcing relationship between assessment results and memory. To obtain better evaluation results, we need to continuously improve our memory, and obtaining good evaluation results can further enhance our memory. We should put aside negative emotions, treat the evaluation results and learning process with a positive attitude, work hard persistently, and believe that we will be able to succeed! It can be seen that we need to improve memory, and Cistanche deserticola can significantly improve memory, because Cistanche deserticola has antioxidant, anti-inflammatory, and anti-aging effects, which can help reduce oxidation and inflammatory reactions in the brain, thereby protecting the health of the nervous system. In addition, Cistanche deserticola can also promote the growth and repair of nerve cells, thus enhancing the connectivity and function of neural networks. These effects can help improve memory, learning, and thinking speed, and may also prevent the development of cognitive dysfunction and neurodegenerative diseases.

Click Know to improve short-term memory
To analyze various performance characteristics, we used an in-house microbenchmark. To evaluate realistic workloads, we used the Yahoo cloud service benchmark (YCSB) [30,31] for Redis [4]. Those programs are configured with the default parameters unless otherwise specified. Because CCoW is implemented at the kernel level, no modification was required for user applications.
4.1. Characterizing CCoW Performance
Since CCoW is controlled by two parameters, namely, the region size and the coverage threshold, these parameters determine the performance and execution behavior of CCoW.
In this sense, first, we evaluated the influence of the region size on the performance and overhead of CCoW. We built a microbenchmark program to evaluate the efficiency of copyon-write. The program is modeled after the execution behavior of Redis. It first populates the 16 GB of memory space divided into 1 KB blocks, and then, a block is selected and updated repeatedly with the predefined data.
The benchmark iterates the operations until it writes 160 GB of data is written. The target blocks are selected according to the Zipfian distribution with the parameter α = 1.0 to provide a reasonable amount of locality in the accesses.
These operations simulate the update operations of Redis with YCSB workloads.
To imitate the snapshot feature of Redis, the benchmark periodically forkchild'shild
process. After creating the child process, the performance of the main benchmark process
drops sharply due to the increased page fault handling overhead.
The performance is
recovered and stabilized over time as fewer pages remain for the copy-on-writmeasuredeasure The time from performance decline to recovery bao 99% of the normal
performance using the original CoW configuration and using this time as the interval for
the forks.
The child process was kept idle for two fork intervals before exiting. We measure the average throughput of the benchmark and the memory footprint of the process while varying the size of region from 32 KB to 2 MB. The throughput indicates the performance gain with CCoW, so the higher is the better.

The memory footprint is measured by summing the residential set size (RSS) of the processes, and it indicates the memory overhead of the CCoW scheme. The results are summarized in Figure 3. The original configuration without the precopy is denoted as 'CoW' and the performance values are normalized to that of the CoW configuration.

Overall, the system performance did not improve significantly in a small region and worsened with 32 KB regions. Whereas in larger region configurations appreciable improvement was observed. However, the performance change was marginal up to 512 KB region size. This is due to the limited exploitation opportunities in small regions. The monitoring overhead was consistent regardless of the region size.
When the region was 2 MB, the benefit outweighed the overhead, and we can observe approximately 0% performance improvement. However, the performance was improved further with larger region sizes.
The memory footprint exhibited a different trend than that of the performance. Even with a small region size, it incurred a considerable amount of memory bloat, which increases as the region size increases. However, it did not increase much even with 2 MB regions. From this evaluation, we can conclude that 2 MB regions provide the maximum performance benefit with a reasonable amount of memory overhead.

Thus, we used this region size for the rest of the study. Next, to find the best coverage threshold for the pre-copy, we measure the throughput and the memory footprint while changing the CCoW threshold value from 70% to 95%. Figure 4 summarizes the measurement results.
All metrics are normalized to that of the original 'CoW' configuration. The number next to 'CCoW-' is the threshold value for the configuration. The 'CCoW-All' configuration is an extreme configuration where the threshold is set to zero so that each page fault copies a 2 MB region. This configuration will effectively be similar to the system a with huge page.
When the threshold value is high, the system precopies only if it is highly confident. Thus, there is decreased exploitation opportunity, thereby displaying slight performance improvement. In contrast, when the threshold value is too small, there is a high chance for the system to mispredict low-locality regions as high-locality regions. Precoplow locality regions incur overhead without any benefits, offsetting the performance benefit.
Thus, the performance peaks at a threshold of 80% and declines for lower threshold values. The space overhead is inversely proportional to the threshold value. The lower the threshold of the system configuration, the more pages are copied, thereby increasing the memory footprint. For the 'CCoW-All' configuration, we observed very high memory bloat.
In this configuration, each page fault incurs a copy of a 2 MB region, eventually making the parent process copy the original data approximately in its entirety.
As the child process can run for two fork periods, multiple child instances exist simultaneously, thereby making the accumulated memory footprint very large. Based on this evaluation, we used a coverage threshold hold 80% for the rest of the study.

For more information:1950477648nn@gmail.com






