The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to reigister at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Software Development Kit (SDK) and API Discussions

Slow ONTAP API response


Hi all,


I'm trying to pull snapmirror lag info from 400 individual volumes in our cluster, which is running release 8.2.1.  I can successfully get the data, but it's taking about 10 seconds per call for the API to return data from each volume.  This is way too slow.


Here's an example of how I'm doing it with python:

filer = NaServer(filer_name, 1, 6)
filer.set_admin_user('admin', password)
cmd = NaElement("snapmirror-get-iter")
options = NaElement("desired-attributes")
max_records = 400

# add options
cmd.child_add_string("max-records", max_records)
ret = filer.invoke_elem(cmd)

# slap all returned attributes gathered by the iterator into a dict
snaplist = dict()
snaplist = ret.child_get('attributes-list')

# grab 'lag-time' from specified volume
def lag(item):
    for mirror in snaplist.children_get():
        if mirror.child_get_string('destination-volume') == item:
            lag = mirror.child_get_string('lag-time')
            print lag

This function iterates  over a list of 400 volumes.


The cluster is performing well, without errors.  There is no general slowness.  The speed of getting data out of the API is consistent, whether the query is coming from inside the same datacenter or remotely.


Is the API supposed to be this slow?  Is there a faster way to do this?  









That 10 seconds sounds a little high from previous experience, but might not be out of the realm of possibility depending on how much data is being pulled back.


In the python snippit you pasted below - is this the function that is being repeated once for each of the 400 volumes?  Or are you pulling the results of 'snapmirror-get-iter' one time and then iterating through the resulting returned data?

NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner