Community

Subscribe
Highlighted

Is there is limit on the value for MAX_RECORDS in the iter api calls for nmsdk

Is there is limit on the value for MAX_RECORDS in the iter api calls for nmsdk? Can I specify 10000 in the value for MAX_RECORDS?

Re: Is there is limit on the value for MAX_RECORDS in the iter api calls for nmsdk

Hi,

I am assuming you are referring to the "maximum" input parameter that we pass as part of *-list-info-iter-next APIs.

You can pass any valid integer (as per API Documentation). And yes, you can specify 10000.

If the number of objects/records are less than the value of "maximum" input parameter provided by you, then all the objects/records will be returned in the same response.

In other words, you can indeed use a large number like 10000 to get all records in same response instead of iterating several times.

However, be aware of the fact that if there are lots (close to 10000) of records and each record contains large amount of data (the XML output structure), then the single response construction (at server side) and XML parsing (on client) may take a huge amount time and also in some cases may timeout. In such cases, it may be more efficient to iterate over the records in smaller chunks (i.e. multiple responses with smaller value of "maximum" input parameter).

Hope this helps.

Regards,

Sen.

Re: Is there is limit on the value for MAX_RECORDS in the iter api calls for nmsdk

Thanks. Yes was referring to the new get-iter commands with ONTAP 8.2

Is there any optimum number that is suggested to pass on to MAX_RECORDS in the get-iter api for netapp cluster queries.

Re: Is there is limit on the value for MAX_RECORDS in the iter api calls for nmsdk

Hi,

The optimum number of max-records should actually vary with the object depending on the length of each record in the output.

e.g. The length of single record in the output of volume-get-iter will be much larger than that of system-image-get-iter.

So, you can afford to pull more records of system-image-get-iter as compared to volume-get-iter in each iteration.

However, in absence of any definitive optimum max-records value, you can go with the default value of max-records which is defined in the API documentation.

In most cases, this value is defined as 20. And in most cases, the APIs have been tested with this default value. So, it would be safe to go with the default value.

Moreover, max-records is an optional parameter. So, you can just skip this parameter in order to invoke the API with the default value.

Regards,

Sen.