<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi All,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We would like to get feedback on following performance issue that we have observed with $expand on /redfish/v1/Chassis/<ChassisId>/Sensors URI compared to using GET on individual Sensor URI (/redfish/v1/Chassis/<ChassisId>/Sensors/<SensorName>)
on some Chassis<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Little bit background about the system:<o:p></o:p></p>
<p class="MsoNormal">1. No of Sensors present on the Chassis_X(where we see performance drop with $expand) : 7 sensors<o:p></o:p></p>
<p class="MsoNormal">2. No of Sensors present on the Chassis_Y(where we DONOT see the performance drop $expand): 31 sensors<o:p></o:p></p>
<p class="MsoNormal">3. We have a common service that host 24 Chassis (including Chassis_X, Chassis_Y)<o:p></o:p></p>
<p class="MsoNormal">4. Total No of Sensors supported by service that host 24 Chassis instances: 102<o:p></o:p></p>
<p class="MsoNormal">5. Time it took with $expand on Chassis_X sensors: 0.48secs('/redfish/v1/Chassis/Chassis_X/Sensors?$expand=*($levels=1)')<o:p></o:p></p>
<p class="MsoNormal">6. Total time taken by querying 7 sensors(present on Chassis_X) URI: 0.6secs<o:p></o:p></p>
<p class="MsoNormal">6. Time it took with $expand on Chassis_Y sensors: 0.48secs('/redfish/v1/Chassis/Chassis_X/Sensors?$expand=*($levels=1)')<o:p></o:p></p>
<p class="MsoNormal">7. Total time taken by querying 31 sensors(present on Chassis_y) URI: 0.91secs<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We see advantage of using $expand on Chassis_Y but not on Chassis_X.<o:p></o:p></p>
<p class="MsoNormal">And Based on our analysis on $expand, looks like performance of $expand on sensors is tied to the number of sensors hosted by backend service and not by the number of sensors present on a Chassis. This is because of "GetManagedObjects"
call done on the backend service which returns 102 sensors in our case irrespective of the number of sensors present on the requested chassis.<o:p></o:p></p>
<p class="MsoNormal">Code Ref: <a href="https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/sensors.hpp#L2471">
https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/sensors.hpp#L2471</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Because of this issue problem, we are noticing significant perf drop when using $expand<o:p></o:p></p>
<p class="MsoNormal">8. Total time to query individual Sensors URI(101) : 3.08secs<o:p></o:p></p>
<p class="MsoNormal">9. Total time to query sensors with $expand(24 URIs) : 12secs<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We would like to know <o:p></o:p></p>
<p class="MsoNormal">1. Is this the correct current behaviour with bmcweb.<o:p></o:p></p>
<p class="MsoNormal">2. if community is also experiencing similar performance drop with case mentioned above and what has been done to resolve it ?<o:p></o:p></p>
<p class="MsoNormal">Also like to know if any recent $expand enhancement done in the sensor area which might help with performance issue, please do let me know.<o:p></o:p></p>
</div>
</body>
</html>