<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Mar 11, 2018, at 11:01 PM, Mike Heins <<a href="mailto:mike@heins.net" class="">mike@heins.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Quoting Peter (</span><a href="mailto:peter@pajamian.dhs.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">peter@pajamian.dhs.org</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">):</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">On 11/03/18 01:44, marco wrote:<br class=""><blockquote type="cite" class="">after 3 months of installation and light use my old production catalogue<br class="">with:<br class=""></blockquote><br class=""><blockquote type="cite" class="">I notice that for the pages with heavy query became very slow and<br class="">sometimes bring to "Gateway Timeout"<br class="">"top" utility display cpu to 100% during page wait sometimes for mysql<br class="">and sometimes for interchange<br class=""></blockquote><br class="">You need to benchmark the code on the problematic pages and find out<br class="">exactly which lines or blocks of code are causing the issue.<br class=""><br class="">This is most likely going to be the result of lots of DB hits from some<br class="">very inefficient code.  Look for calls to [data] or [field], or similar<br class="">tags that waste db hits inside of a [loop] or similar.  Rewrite your<br class="">code so that it does a single query to the db to get all the data you<br class="">need instead and it will end up being way more efficient.<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Don't discount the possibility that the I/O on this virtual instance</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">is slower than on the other one. Are there demanding applications which</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">show the same speed on the new container? Try doing some large DB queries</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">on both the old and the new and comparing.</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote></div><div class=""><br class=""></div>With newer perls, my personal experience is that parsing slowdowns are caused by using regexes against Unicode strings.  If you’re using PostgreSQL with DBD::Pg >= 3, this can also materialize itself *even without* explicit configuration on the interchange side (i.e., MV_UTF8 and friends).  If this matches your situation: Newer perl, PostgreSQL, DBD::Pg >= 3 (*no* MV_UTF8 configuration) you can turn off the automatic unicodization of database data via this in your catalog.cfg:<div class=""><br class=""></div><div class="">DatabaseDefault PG_ENABLE_UTF8 0</div><div class=""><br class=""></div><div class="">The issue is that DBD::Pg >= 3 by default will automatically decode any data it pulls from the server if the client_encoding is UTF8, unless you explicitly disable that functionality, which means that any page where IC interpolates data that came from the database will have the page string upgraded to Unicode, which will take the slower regex path.  This is particularly noticeable in perls ~ 5.14 - 5.20, but is still substantially slower than the non-unicode path in 5.24.</div><div class=""><br class=""></div><div class="">Not sure if that might help explain things, but this is something we’ve run into with recent perls.  Additionally, the normal database optimization approaches mentioned elsewhere in this thread will also always be good too.<br class=""><div class=""><br class=""></div><div class="">Best,</div><div class=""><br class=""></div><div class="">David<br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">--<br class="">David Christensen<br class="">End Point Corporation<br class=""><a href="mailto:david@endpoint.com" class="">david@endpoint.com</a><br class="">785-727-1171<br class=""><br class=""><br class=""></div>

</div>
<br class=""></div></div></body></html>