Hi folks,

I'm trying to get to the bottom of why my call to list security groups in
nova is very slow.

This is some of my code (scala):

  val context = ContextBuilder.newBuilder("openstack-nova")
    .endpoint(origin.endpoint)
    .credentials(s"${origin.tenant}:${origin.user}", origin.secret)
    .build(classOf[ComputeServiceContext])
  val compute = context.getComputeService
  val securityGroupExtension = compute.getSecurityGroupExtension.get
  val secGroups = securityGroupExtension.listSecurityGroups
  val result = secGroups.map ( fromJCloud(_, existingGroups) )

Most of this is very quick, but when debugging I see that the call to
listSecurityGroups is slow. In one example run this took 6 minutes and 17
seconds to retrieve 32 security groups.

I've started to dig into this by observing the calls to the API. During the
six minute method call, 93 separate requests are made to the openstack
apis. The first is a call to GET /v2/<id>/extensions and the following 92
are calls to GET /v2/<id>/os-security-groups. These 92 calls all get an
identical response from the API and the calls are made with about 4 seconds
delay.

After all these calls the method returns with 32 records (I'm afraid I
haven't yet verified if the data is correct).

If anyone has any ideas or can point me to the classes that actually carry
out the collection of the data, I'd be grateful.

I also note that I am running this code across a couple of dozen tenants
and only two of them are quite this slow, most complete within a minute.

Many thanks,
Simon

--
Simon Hildrew
Lead Infrastructure Developer
theguardian.com

Please consider the environment before printing this email.
------------------------------------------------------------------
Visit theguardian.com   

On your mobile, download the Guardian iPhone app theguardian.com/iphone and our 
iPad edition theguardian.com/iPad   
Save up to 57% by subscribing to the Guardian and Observer - choose the papers 
you want and get full digital access.
Visit subscribe.theguardian.com

This e-mail and all attachments are confidential and may also
be privileged. If you are not the named recipient, please notify
the sender and delete the e-mail and all attachments immediately.
Do not disclose the contents to another person. You may not use
the information for any purpose, or store, or copy, it in any way.
 
Guardian News & Media Limited is not liable for any computer
viruses or other material transmitted with or as part of this
e-mail. You should employ virus checking software.
 
Guardian News & Media Limited
 
A member of Guardian Media Group plc
Registered Office
PO Box 68164
Kings Place
90 York Way
London
N1P 2AP
 
Registered in England Number 908396

--------------------------------------------------------------------------

Reply via email to