Justin.<div><br></div><div>First of all, I can not read from the chart, but anyway history rendering has been worked on in a new code branch. Probably this code will be part of RT 3.10. Code at the moment is unstable, but eventually it wil be faster then the current version. <br>
<br><div class="gmail_quote">On Mon, Sep 6, 2010 at 8:56 PM, Justin Hayes <span dir="ltr"><<a href="mailto:justin.hayes@openbet.com">justin.hayes@openbet.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word">So far we've tried installing RT on different hardware, both 32 and 64bit versions of linux. RT is still very slow for long tickets. All the time is taken up by the perl/apache process maxing out a core of CPU.<div>
<br></div><div>We've even gone as far as trying to profile the code. We came up with this graph of where the time was going:</div><div><br></div><div><img height="405" width="640" src="cid:176DCA98-3654-4802-B2A1-416BD11724C3@openbet"><br>
<div>We then tried to go further into those functions but can't find a single smoking gun call that is taking all the time.</div><div><br></div><div>For example in a ticket that takes 22s to render approx 5 secs goes on these 2 lines:</div>
<div><br></div><div>File: Ticket/Elements/ShowHistory line: 100-103 version 3.8.8</div><div><br></div><div><span style="white-space:pre-wrap"> </span>my @trans_attachments = grep { $_->TransactionId == $Transaction->Id } @attachments;<br>
<br><span style="white-space:pre-wrap"> </span>grep { ($_->TransactionId == $Transaction->Id ) && ($trans_content->{$_->Id} = $_) } @attachment_content;</div><div><br></div><div>Both are greps. Does this imply that perl itself is just slow?</div>
<div><br></div><div>IF so why would our perl be slow compared to other people's? We've tried compiling it from source and that made no difference.</div><div><br></div><div>ATM we're at a bit of a loss....</div>
<div class="im"><div><br></div><div>Justin</div><div>
<br>-------------------------------------------------<br>Justin Hayes<br>OpenBet Support Manager<br><a href="mailto:justin.hayes@openbet.com" target="_blank">justin.hayes@openbet.com</a>
</div>
<br></div><div><div class="im"><div>On 1 Jul 2010, at 11:51, Raed El-Hames wrote:</div><br></div><blockquote type="cite"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div lang="EN-GB" link="blue" vlink="purple" style="word-wrap:break-word">
<div><div class="im"><div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:rgb(31, 73, 125)">Justin,</span></div>
<div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:rgb(31, 73, 125)"> </span></div>
<div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:rgb(31, 73, 125)">Do you use Transaction custom fields, if you do n’t ; try and comment out lines 70,71,72 from html/Ticket/Elements/ShowTransaction</span></div>
<div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:rgb(31, 73, 125)">% if ( $Transaction->CustomFieldValues->Count ) {</span></div>
<div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:rgb(31, 73, 125)"> <& /Elements/ShowCustomFields, Object => $Transaction &></span></div>
<div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:rgb(31, 73, 125)">% }</span></div>
<div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:rgb(31, 73, 125)">See if that improves things for you.</span></div>
<div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:rgb(31, 73, 125)">Some of our monitoring tickets can have up to 500 updates, such tickets use to take up to 20s to load, once I commented out the above lines, load time is now down to less than 5 seconds.</span></div>
<div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:rgb(31, 73, 125)"> </span></div>
<div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:rgb(31, 73, 125)">Regards;</span></div>
<div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:rgb(31, 73, 125)">Roy</span></div>
<div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:rgb(31, 73, 125)"> </span></div>
<div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"><span style="font-size:11pt;font-family:Calibri, sans-serif;color:rgb(31, 73, 125)"> </span></div>
</div><div style="border-top-style:none;border-right-style:none;border-bottom-style:none;border-width:initial;border-color:initial;border-left-style:solid;border-left-color:blue;border-left-width:1.5pt;padding-top:0cm;padding-right:0cm;padding-bottom:0cm;padding-left:4pt">
<div><div style="border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;border-top-style:solid;border-top-color:rgb(181, 196, 223);border-top-width:1pt;padding-top:3pt;padding-right:0cm;padding-bottom:0cm;padding-left:0cm">
<div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"><b><span lang="EN-US" style="font-size:10pt;font-family:Tahoma, sans-serif">From:</span></b><span lang="EN-US" style="font-size:10pt;font-family:Tahoma, sans-serif"><span> </span><a href="mailto:rt-users-bounces@lists.bestpractical.com" style="color:blue;text-decoration:underline" target="_blank">rt-users-bounces@lists.bestpractical.com</a><span> </span>[mailto:<a href="mailto:rt-users-bounces@lists.bestpractical.com" target="_blank">rt-users-bounces@lists.bestpractical.com</a>]<span> </span><b>On Behalf Of<span> </span></b>Justin Hayes<div class="im">
<br><b>Sent:</b><span> </span>01 July 2010 11:39<br><b>To:</b><span> </span>Kenneth Crocker<br><b>Cc:</b><span> </span><a href="mailto:rt-users@lists.bestpractical.com" style="color:blue;text-decoration:underline" target="_blank">rt-users@lists.bestpractical.com</a><br>
</div><div class="im"><b>Subject:</b><span> </span>Re: [rt-users] Slow Ticket History 3.8.8</div></span></div></div></div><div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif">
</div><div><div></div><div class="h5"><div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif">We do Kenneth, but most tickets don't have many file attachments, so I assume that's not an issue?</div>
<div><div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"> </div></div><div><div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif">
Cheers,</div></div><div><div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"> </div></div><div><div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif">
Justin</div><div><div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"><span style="font-size:13.5pt;font-family:Helvetica, sans-serif;color:black"><br>
<span>-------------------------------------------------</span><br><span>Justin Hayes</span><br><span>OpenBet Support Manager</span><br><span><a href="mailto:justin.hayes@openbet.com" style="color:blue;text-decoration:underline" target="_blank">justin.hayes@openbet.com</a></span></span></div>
</div><div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"> </div><div><div><div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif">
On 29 Jun 2010, at 17:54, Kenneth Crocker wrote:</div></div><div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"><br><br></div><p class="MsoNormal" style="margin-top:0cm;margin-right:0cm;margin-bottom:12pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif">
Justin,<br><br>I didn't see this mentioned and may have missed it, but are you displaying attachements inline? That might cut back on the I/O for History. Just a thought.<br><br>Kenn<br>LBNL</p><div><div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif">
On Tue, Jun 29, 2010 at 8:04 AM, Justin Hayes <<a href="mailto:justin.hayes@openbet.com" style="color:blue;text-decoration:underline" target="_blank">justin.hayes@openbet.com</a>> wrote:</div><div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif">
As a test we've just created a long ticket in an empty RT DB and it's very fast. So does look to be DB related - contrary to our earlier investigations.<br><br>I guess it must still access the DB resultset during the ticket rendering (which isn't how we thought it would work).<br>
<br>Time to tune the hell out of mysql then.......</div><div><p class="MsoNormal" style="margin-top:0cm;margin-right:0cm;margin-bottom:12pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"><br>
Justin<br><br>-------------------------------------------------<br>Justin Hayes<br>OpenBet Support Manager<br><a href="mailto:justin.hayes@openbet.com" style="color:blue;text-decoration:underline" target="_blank">justin.hayes@openbet.com</a></p>
</div><div><div><div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif">On 29 Jun 2010, at 15:53, Justin Hayes wrote:<br><br>> Seem to be quite a few things to look at Jason. Need to figure out what they all mean first.<br>
><br>> Justin<br>><br>> -------- General Statistics --------------------------------------------------<br>> [--] Skipped version check for MySQLTuner script<br>> [OK] Currently running supported MySQL version 5.1.37-1ubuntu5.4-log<br>
> [OK] Operating on 64-bit architecture<br>><br>> -------- Storage Engine Statistics -------------------------------------------<br>> [--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster<br>> [--] Data in MyISAM tables: 611M (Tables: 8)<br>
> [--] Data in InnoDB tables: 10G (Tables: 20)<br>> [!!] Total fragmented tables: 21<br>><br>> -------- Performance Metrics -------------------------------------------------<br>> [--] Up for: 19d 19h 32m 37s (110M q [64.266 qps], 222K conn, TX: 637B, RX: 39B)<br>
> [--] Reads / Writes: 98% / 2%<br>> [--] Total buffers: 602.0M global + 134.8M per thread (150 max threads)<br>> [!!] Maximum possible memory usage: 20.3G (262% of installed RAM)<br>> [OK] Slow queries: 0% (229K/110M)<br>
> [!!] Highest connection usage: 100% (151/150)<br>> [OK] Key buffer size / total MyISAM indexes: 512.0M/6.7M<br>> [OK] Key buffer hit rate: 100.0% (84M cached / 7K reads)<br>> [OK] Query cache efficiency: 71.4% (76M cached / 107M selects)<br>
> [!!] Query cache prunes per day: 661360<br>> [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 2M sorts)<br>> [!!] Joins performed without indexes: 112714<br>> [!!] Temporary tables created on disk: 33% (968K on disk / 2M total)<br>
> [OK] Thread cache hit rate: 99% (1K created / 222K connections)<br>> [OK] Table cache hit rate: 36% (318 open / 880 opened)<br>> [OK] Open file limit used: 14% (166/1K)<br>> [OK] Table locks acquired immediately: 99% (39M immediate / 39M locks)<br>
> [!!] InnoDB data size / buffer pool: 10.1G/8.0M<br>><br>> -------- Recommendations -----------------------------------------------------<br>> General recommendations:<br>> Run OPTIMIZE TABLE to defragment tables for better performance<br>
> Reduce your overall MySQL memory footprint for system stability<br>> Reduce or eliminate persistent connections to reduce connection usage<br>> Adjust your join queries to always utilize indexes<br>> When making adjustments, make tmp_table_size/max_heap_table_size equal<br>
> Reduce your SELECT DISTINCT queries without LIMIT clauses<br>> Variables to adjust:<br>> *** MySQL's maximum memory usage is dangerously high ***<br>> *** Add RAM before increasing MySQL buffer variables ***<br>
> max_connections (> 150)<br>> wait_timeout (< 28800)<br>> interactive_timeout (< 28800)<br>> query_cache_size (> 16M)<br>> join_buffer_size (> 2.0M, or always use indexes with joins)<br>
> tmp_table_size (> 128M)<br>> max_heap_table_size (> 64M)<br>> innodb_buffer_pool_size (>= 10G)<br>><br>><br>> -------------------------------------------------<br>> Justin Hayes<br>
> OpenBet Support Manager<br>><span> </span><a href="mailto:justin.hayes@openbet.com" style="color:blue;text-decoration:underline" target="_blank">justin.hayes@openbet.com</a><br>><br>> On 29 Jun 2010, at 15:22, Jason Doran wrote:<br>
><br>>> Hi,<br>>> If you are using mysqld have a look at "<a href="http://mysqltuner.pl/" style="color:blue;text-decoration:underline" target="_blank">mysqltuner.pl</a>" perl script (google)<br>>> This has fixed quickly many performance issues on both RT and other<br>
>> web-based software we use. I run this every few weeks and apply suggested<br>>> changes and then simply restart mysqld when things are quite.<br>>><br>>> Regards,<br>>> Jason Doran<br>>> Computer Centre<br>
>> NUI, Maynooth<br>>><br>>> On 29 Jun 2010, at 14:09, Justin Hayes wrote:<br>>><br>>>> Hi everyone,<br>>>><br>>>> I've raised this before, but we've had another look at it and still can't see how to improve things.<br>
>>><br>>>> We put a lot of comments/replies in our tickets. Often there can be 50-100 entries in a ticket, mostly plain text. Loading such a ticket can take 10-20secs.<br>>>><br>>>> We don't have any slow queries - all the time seems to be in the code rendering the history of the ticket.<br>
>>> We've had a go at stripping functions out of ShowHistory, ShowTransaction and ShowTransactionAttachmments but not had much success.<br>>>><br>>>> FWIW our RT runs on quad 3ghz Xeons with 8gb of ram.<br>
>>><br>>>> I'd like to try and determine if we're just slow, or if this is just how long RT takes. Maybe perl is just slow.<br>>>><br>>>> Can anyone shed any light on how long it takes them to render long tickets in their systems? If you look at the page source it gives you a value e.g.<br>
>>><br>>>> <span>Time to display: 24.996907</span><br>>>><br>>>> Can anyone share some numbers from theirs for longer tickets? It would be really appreciated.<br>>>><br>
>>><br>>>> Thanks,<br>>>><br>>>> Justin<br>>>><br>>>> -------------------------------------------------<br>>>> Justin Hayes<br>>>> OpenBet Support Manager<br>
>>><span> </span><a href="mailto:justin.hayes@openbet.com" style="color:blue;text-decoration:underline" target="_blank">justin.hayes@openbet.com</a><br>>>><br>>>><br>>>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.<br>
>>> Buy a copy at<span> </span><a href="http://rtbook.bestpractical.com/" style="color:blue;text-decoration:underline" target="_blank">http://rtbook.bestpractical.com</a><br>>><br>><br>><br>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.<br>
> Buy a copy at<span> </span><a href="http://rtbook.bestpractical.com/" style="color:blue;text-decoration:underline" target="_blank">http://rtbook.bestpractical.com</a><br><br><br>Discover RT's hidden secrets with RT Essentials from O'Reilly Media.<br>
Buy a copy at<span> </span><a href="http://rtbook.bestpractical.com/" style="color:blue;text-decoration:underline" target="_blank">http://rtbook.bestpractical.com</a></div></div></div></div><div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif">
<br><br>Discover RT's hidden secrets with RT Essentials from O'Reilly Media.<br>Buy a copy at<span> </span><a href="http://rtbook.bestpractical.com" style="color:blue;text-decoration:underline" target="_blank">http://rtbook.bestpractical.com</a></div>
</div><div style="margin-top:0cm;margin-right:0cm;margin-bottom:0.0001pt;margin-left:0cm;font-size:12pt;font-family:'Times New Roman', serif"> </div></div></div></div></div></div></div></span></blockquote></div><br>
</div></div><br><br>
RT Training in Washington DC, USA on Oct 25 & 26 2010<br>
Last one this year -- Learn how to get the most out of RT!<br></blockquote></div><br><br clear="all"><br>-- <br>Best regards, Ruslan.<br>
</div>