This shows you the differences between two versions of the page.
ep:labs:04:contents:tasks:ex3 [2025/02/11 23:36] cezar.craciunoiu |
ep:labs:04:contents:tasks:ex3 [2025/03/24 22:08] (current) silvia.dragan [03. [30p] Kernel Samepage Merging] |
||
---|---|---|---|
Line 5: | Line 5: | ||
Download the {{:ep:labs:02:contents:tasks:ksm.zip|skeleton}} for this task. | Download the {{:ep:labs:02:contents:tasks:ksm.zip|skeleton}} for this task. | ||
- | === [15p] Task A - Check kernel support & enable ksmd === | + | === [10p] Task A - Check kernel support & enable ksmd === |
First things first, you need to verify that KSM was enabled during your kernel's compilation. For this, you need to check the Linux build configuration file. Hopefully, you should see something like this: | First things first, you need to verify that KSM was enabled during your kernel's compilation. For this, you need to check the Linux build configuration file. Hopefully, you should see something like this: | ||
Line 29: | Line 29: | ||
There are a few more files in the ksm/ directory. We will still use one or two later on. But for now, configuring the previous ones should be enough. Google the rest if you're interested. | There are a few more files in the ksm/ directory. We will still use one or two later on. But for now, configuring the previous ones should be enough. Google the rest if you're interested. | ||
- | === [15p] Task B - Watch the magic happen === | + | === [10p] Task B - Watch the magic happen === |
For this step it would be better to have a few terminals open. First, let's start a ''vmstat''. Keep your eyes on the active memory column when we run the sample program. | For this step it would be better to have a few terminals open. First, let's start a ''vmstat''. Keep your eyes on the active memory column when we run the sample program. | ||
Line 59: | Line 59: | ||
Include a screenshot with the same output as the one in the spoiler above. \\ | Include a screenshot with the same output as the one in the spoiler above. \\ | ||
Edit the screenshot or note in writing at what point you started the application, where it reached max memory usage, the interval where KSM daemon was doing its job (in the 10s sleep interval) and where the process died. | Edit the screenshot or note in writing at what point you started the application, where it reached max memory usage, the interval where KSM daemon was doing its job (in the 10s sleep interval) and where the process died. | ||
+ | |||
+ | === [10p] Task C - Plot results === | ||
+ | Now that you’ve observed the effects of KSM using vmstat, it’s time to visualize them. Generate a real-time plot that shows free memory, used memory, and memory used as a buffer over time, based on the freemem column from the output of the vmstat command. The plot should dynamically adjust the axis ranges based on the data. The x-axis should represent time, and the y-axis should represent the amount of free memory. The plot should update in real-time as new data is collected. | ||
+ | |||
+ | |||
+ |