sexta-feira, 14 de agosto de 2009

Performance Tuning CF

Identification:
. listen to what your server is trying to tell you
. enable slow page loggin
. obtain and analyze a heap dump
. review memory utilization with visual vm and visual gc plugin
. investigate method calls with hpjmeter
. capure a sql trace during peak production site load

dica: Interessante habilitar o kernel times no taskmgr para identificar problemas no servidor. ver linhas do grafico

Slow page Loggin:
. enable in cf
. process the server.log with findslow.cfm (cfcode.com) to get a report on the most often used slow templates.

heap dump:
.
obtain a heap dump. -XX:+HeapDumpOnOutOfMemoryError
VisualVM (app -> heap dump)
. Review the heap dump in netbeans or visualvm
===> quando o CF trava ele escreve um arquivo no /bin. (sobreescreve o ultimo criado)

HPJmeter
.
Capture method invocation data
. Identify lingering objects (mem leaks)

Not always about the code
. network issues - identify overload nic with task mgr, host issues (ping pathping), wireshark (packet listing)
. ports open (free extended task mgr).
. identify overload disk resources (check memory , cpu, processes, disk i/o)
. poorly configured database - capture a .trc file using sql profiler with 'tuning' profile selected (in production). Run .trc through database tuning advisor (available on sql standard or higher) and quickly locate database slow-downs, and even implement recommended fixes.
-- the more sample the better the result.

o tracer contem todas as execucoes que foram feitas naquele banco de dados durante o periodo capturado, o software ira executar essas operacoes e verificar onde estao os gargalos na db especificada.

in the end its all about user perception

.
enable gzip compression of static site assets
. combine css and js for faster loading
. enable expiration tags for images, css, and js files for future date.
. use a tool like yslow to id user-side issues.
. testing with tools like jmeter can help you get a better user perspective on site performance.

Chris Peterson
www.alagad.com
cpeterson@alagad.com
(888) alagad4 ext 369
override11 twitter

Nenhum comentário:

Postar um comentário