[ClusterLabs] Antw: [EXT] Re: Live migration possible with KSM ?
Ulrich Windl
Ulrich.Windl at rz.uni-regensburg.de
Tue Apr 6 05:52:19 EDT 2021
>>> Klaus Wenninger <kwenning at redhat.com> schrieb am 06.04.2021 um 09:28 in
Nachricht <59526b01-e3cb-737d-9357-26e4ff46d0fc at redhat.com>:
> On 3/30/21 7:54 PM, Strahil Nikolov wrote:
>> Keep in mind that KSM is highly cpu intensive and is most suitable for
>> same type of VMs,so similar memory pages will be merged until a change
>> happen (and that change is allocated elsewhere).
>>
>> In oVirt migration is possible with KSM actively working, so it should
>> work with pacemaker.
>>
>>
>> I doubt that KSM would be a problem... most probably performance would
>> not be optimal.
>>
>> Best Regards,
>> Strahil Nikolov
>>
>> On Tue, Mar 30, 2021 at 19:47, Andrei Borzenkov
>> <arvidjaar at gmail.com> wrote:
>> On 30.03.2021 18:16, Lentes, Bernd wrote:
>> > Hi,
>> >
>> > currently i'm reading "Mastering KVM Virtualization", published
>> by Packt Publishing, a book i can really recommend.
>> > There are some proposals for tuning guests. One is KSM (kernel
>> samepage merging), which sounds quite interesting.
>> > Especially in a system with lots of virtual machines with the
>> same OS this could lead to significant merory saving.
>> > I'd like to test, but i don't know if KSM maybe prevents live
>> migration in a pacemaker cluster.
>>
>> I do not think pacemaker cares or is aware about KSM. It just tells
>> resource agent to perform migration; what happens is entirely up to
>> resource agent.
>>
>> If you can migrate without pacemaker you can also migrate with
>> pacemaker.
>>
> Apart from the cpu consumption another point to be
> careful about with migration could be that when you
> start up machines they will increase memory consumption
> as they start up services and at the same time ksm-daemon
> will scan them and merge the pages keeping memory
> consumption under control - possibly without big spikes.
> When you move a lot of VMs to a node I'd expect a spike
> in memory consumption till ksm-daemon is able to do
> the merging. Of course that will depend on network
> throughput competing with ksm-daemon. No idea if any
> special hinting for ksm is being done on a migration.
Probably on the long-run KSM improves performance (by keeping common pages only once in RAM, thus probably also in CPU cache) rather than saving memory (by deduplicating). Of cource if VMs shuffle RAM like mad (I wrote a program that does such a thing, just to demonstrate issues with virtual memory handling), the opposite may be true.
>
> Klaus
>>
>>
>> _______________________________________________
>> Manage your subscription:
>> https://lists.clusterlabs.org/mailman/listinfo/users
>> <https://lists.clusterlabs.org/mailman/listinfo/users>
>>
>> ClusterLabs home: https://www.clusterlabs.org/
>> <https://www.clusterlabs.org/>
>>
>>
>> _______________________________________________
>> Manage your subscription:
>> https://lists.clusterlabs.org/mailman/listinfo/users
>>
>> ClusterLabs home: https://www.clusterlabs.org/
More information about the Users
mailing list