Preloading gives 3X performance!

70 views
Skip to first unread message

Leo Godin

unread,
Mar 7, 2014, 10:01:21 AM3/7/14
to psp...@googlegroups.com
I read through the psphere docs again yesterday and noticed the section on preloading and caching. Tried it out in my app that pulls cluster, license and storage data from about 100 clusters.  Preloading the datastores reduced the time to run from 48 minutes to 16 minutes. Huge improvement. 

Thanks for the good documentation.  

Michael Rice

unread,
Mar 7, 2014, 10:05:50 AM3/7/14
to psp...@googlegroups.com

Have you tried using pyvmomi? VMware released that in late December or early January. I've seen some huge speed increases by using it.

https://github.com/vmware/pyvmomi

-mike

On Mar 7, 2014 9:01 AM, "Leo Godin" <leogo...@gmail.com> wrote:
I read through the psphere docs again yesterday and noticed the section on preloading and caching. Tried it out in my app that pulls cluster, license and storage data from about 100 clusters.  Preloading the datastores reduced the time to run from 48 minutes to 16 minutes. Huge improvement. 

Thanks for the good documentation.  

--
You received this message because you are subscribed to the Google Groups "psphere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psphere+u...@googlegroups.com.
To post to this group, send email to psp...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/psphere/24db442e-4a64-4bbf-ac2a-cadd9e943797%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Leo Godin

unread,
Mar 7, 2014, 2:05:23 PM3/7/14
to psp...@googlegroups.com
I haven't. I did look at this recently, but didn't actually try it out.  What I have works, so I don't want to change anything. However, the next rev of my app will be more complex and I'll look into different libraries then. 

Matthew Welch

unread,
Mar 7, 2014, 2:30:57 PM3/7/14
to psp...@googlegroups.com
Thanks Leo, that is a good find and needs better documentation.

On pyvmomi, the raw use of SOAP and XML they are using is really fast.
There was some initial work to get psphere to build the calls w/o suds
which is where a lot of the compute and resource usage comes from in
psphere. It maybe worth starting discussions on trying to make the
psphere API work on top of pyvmomi.


For example, with pyvmomi to get a list of VMs you get something like this:

content = si.RetrieveContent()
datacenter = content.rootFolder.childEntity[0]
vmFolder = datacenter.vmFolder
vmList = vmFolder.childEntity

And for psphere to get a list of VMs you would do something like this:

vms = VirtualMachine.all(client)

In my opinion, being able to merge the underlying query structure of
pyvmomi into a psphere like API would be amazing. I think this should
be possible with either an initial start of wrappers or future
modeling of the various managed objects. Any thoughts on this idea?

- matt
> https://groups.google.com/d/msgid/psphere/eb396e50-e4f7-4f58-883e-db3dfd45a4c6%40googlegroups.com.

Jonathan Kinred

unread,
Mar 8, 2014, 3:15:03 PM3/8/14
to psp...@googlegroups.com

Great thinking Matthew.

When I first saw Pyvmomi a couple of weeks ago this was the first thing that came to mind.

I think there is a lot if value in the ORM style interface and I'm sure there are a number of users who wouldn't want to rewrite their code.

Jonathan

Reply all
Reply to author
Forward
0 new messages