[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] 'dommemstat' is not working for LXC hypervisor.



Now it's showing Used Memory as 0. I don't know whether it's correct or not.
I wrote a small script in the domain to check the used memory, which will run continuously in the infinite loop.
dominfo 'domainname' is showing Used Memory as 0.
Is this right way to check the Used Memory of that domain?

Regards,
Srikanth.

-----Original Message-----
From: Ryota Ozaki [mailto:ozaki ryota gmail com] 
Sent: Thursday, April 29, 2010 5:50 PM
To: Kumar L Srikanth-B22348
Cc: Daniel P. Berrange; libvirt list; Ryota OZAKI
Subject: Re: [libvirt] 'dommemstat' is not working for LXC hypervisor.

On Thu, Apr 29, 2010 at 9:14 PM, Kumar L Srikanth-B22348 <B22348 freescale com> wrote:
> Thanks ozaki.
> But can you please elaborate the process of getting memory.stat of a particular domain?
> I mounted cgroup filesystem prior to start libvirtd service using the below command:
> mount -t cgroup cgroup /cgroup
>
> Then started libvirtd service.
> Then started the domain.
>
> Here, can you let me know the process of viewing memory stats of that particular domain?

Could you check output of dominfo again. Cannot you get proper 'Used memory'?

> By the way, in the /cgroup directory lot of files are created. In those, which one can be memory stats?

/cgroup/memory.stat is.

  ozaki-r

>
> Regards,
> Srikanth.
>
> -----Original Message-----
> From: Ryota Ozaki [mailto:ozaki ryota gmail com]
> Sent: Thursday, April 29, 2010 5:27 PM
> To: Kumar L Srikanth-B22348
> Cc: Daniel P. Berrange; libvirt list; Ryota OZAKI
> Subject: Re: [libvirt] 'dommemstat' is not working for LXC hypervisor.
>
> On Wed, Apr 28, 2010 at 8:19 PM, Kumar L Srikanth-B22348 <B22348 freescale com> wrote:
>> Daniel,
>> My requirement is to get how much memory is free in the guest domain.
>> Can you please let me know, how can I do that?
>
> Do you enable cgroup memory subsystem? If so, something wrong in lxc driver of 0.8.0.
>
> BTW, 'Used memory' includes both RSS and caches, so if you need total-RSS value, you should use dommemstat.
>
>> And also, as you said it's quite easy to implement dommemstats for 
>> lxc driver, is there any possibility to implement that?
>
> We can get statistics of dommemstat easily through memory.stat of cgroup.memory subsystem except statistics of page faults.
>
>  ozaki-r
>
>>
>> Regards,
>> Srikanth.
>>
>> -----Original Message-----
>> From: Daniel P. Berrange [mailto:berrange redhat com]
>> Sent: Wednesday, April 28, 2010 4:46 PM
>> To: Kumar L Srikanth-B22348
>> Cc: libvir-list redhat com
>> Subject: Re: 'dommemstat' is not working for LXC hypervisor.
>>
>> On Wed, Apr 28, 2010 at 04:43:41PM +0530, Kumar L Srikanth-B22348 wrote:
>>> Thanks for the reply Daniel.
>>> Virsh dominfo dommand showing following results:
>>>
>>> Id:             32473
>>> Name:           vm1
>>> UUID:           f13bc513-15f2-1dd1-74f6-18c47931ece9
>>> OS Type:        exe
>>> State:          running
>>> CPU(s):         1
>>> Max memory:     5000000 kB
>>> Used memory:    5000000 kB
>>> Autostart:      disable
>>>
>>>
>>> Though whatever services running on the domain, every time used 
>>> memory
>>
>>> is showing as 5000000 kB. Is that result is correct?
>>
>> The 'Max memory' 5000000 KB is the hard limit that is allocated to 
>> the container. I thought that the 'used memory' field would be lower, 
>> but its possible we don't have the actual stats for used memory so 
>> just set both the same. I'd have to research the code again to answer for sure...
>>
>> Daniel
>> --
>> |: Red Hat, Engineering, London    -o-
>> http://people.redhat.com/berrange/ :|
>> |: http://libvirt.org -o- http://virt-manager.org -o-
>> http://deltacloud.org :|
>> |: http://autobuild.org        -o-
>> http://search.cpan.org/~danberr/ :|
>> |: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 
>> |7D3B
>> 9505 :|
>>
>>
>> --
>> libvir-list mailing list
>> libvir-list redhat com
>> https://www.redhat.com/mailman/listinfo/libvir-list
>>
>
>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]