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

Re: [MirageOS-devel] CPU and memory utilisation



Mirage should be using the CPU at 100% all the time it's not in
block_domain. main.ml emits trace events around this call:

          MProf.Trace.(note_hiatus Wait_for_work);
          block_domain timeout;
          MProf.Trace.note_resume ();

https://github.com/mirage/mirage-platform/blob/3d343935f451ba6c505e5008d2e458cf506bad8d/xen/lib/main.ml#L78

Turning on the full trace API will slow your code down quite a bit,
but you could pin a modified version of mirage-profile that captures
just these events for testing.


On 19 May 2015 at 09:49, Masoud Koleini <masoud.koleini@xxxxxxxxxxxxxxxx> wrote:
> Hi Anil and Mindy,
>
> Thank you for the information and the link.
>
> I am trying to get CPU utilisation from *within* the unikernel.
>
>
>
> On 18/05/15 19:47, Anil Madhavapeddy wrote:
>>
>> Hi Masoud,
>>
>> The CPU utilisation is most easily done from the outside by using "xentop"
>> or similar tools to gather the virtual machine utilisation.  The unikernel
>> will just be sitting blocked when there's no IO, so this is accurate.
>>
>> Memory can be obtained via the OCaml GC module; Mindy's reply has a link
>> to the easy way to use it to generate HTML.
>>
>> A more subtle question: are you trying to get this information from
>> *within*
>> the unikernel to alter its behaviour in response to load?  In that case
>> you'll
>> need a slightly more sophisticated way to measure CPU usage from within
>> the
>> VM.
>>
>> -anil
>>
>>> On 18 May 2015, at 10:56, Masoud Koleini
>>> <masoud.koleini@xxxxxxxxxxxxxxxx> wrote:
>>>
>>> Hi all,
>>>
>>> Is the any way for a Mirage unikernel to get its CPU and memory
>>> utilisation?
>>>
>>> Thanks.
>>>
>>>
>>>
>>>
>>>
>>>
>>> This message and any attachment are intended solely for the addressee
>>> and may contain confidential information. If you have received this
>>> message in error, please send it back to me, and immediately delete it.
>>> Please do not use, copy or disclose the information contained in this
>>> message or in any attachment.  Any views or opinions expressed by the
>>> author of this email do not necessarily reflect the views of the
>>> University of Nottingham.
>>>
>>> This message has been checked for viruses but the contents of an
>>> attachment may still contain software viruses which could damage your
>>> computer system, you are advised to perform your own checks. Email
>>> communications with the University of Nottingham may be monitored as
>>> permitted by UK legislation.
>>>
>>>
>>> _______________________________________________
>>> MirageOS-devel mailing list
>>> MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
>>> http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
>>>
>
>
>
>
>
> This message and any attachment are intended solely for the addressee
> and may contain confidential information. If you have received this
> message in error, please send it back to me, and immediately delete it.
> Please do not use, copy or disclose the information contained in this
> message or in any attachment.  Any views or opinions expressed by the
> author of this email do not necessarily reflect the views of the
> University of Nottingham.
>
> This message has been checked for viruses but the contents of an
> attachment may still contain software viruses which could damage your
> computer system, you are advised to perform your own checks. Email
> communications with the University of Nottingham may be monitored as
> permitted by UK legislation.
>
>
> _______________________________________________
> MirageOS-devel mailing list
> MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
> http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel



-- 
Dr Thomas Leonard        http://roscidus.com/blog/
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.