Request temporary peaks on how to find a bottleneck

I am trying to figure out bottlenecks in a web application on a production server. ColdFusion 10 runs about 80 sites with the latest versions of Java 8, Tomcat 7, IIS 8.5 on Windows Server 2012 R2. Random requests peak from an average of 500-1000 ms to 30 seconds, which means that 9 out of 10 requests of the same page are completed within 1000 ms, and one takes 20-30 seconds. It seems that this can happen on almost every page / template with code.

Web Application Features:

  • many regular expressions and string manipulations
  • many data transformations (list for array, recreation of arrays, ordering of data order, creation of structures)
  • lightweight SQL queries (dedicated SQL server on the same network)
  • no outgoing connections ( <cfhttp>)

I am tracking the use of FusionReactor, and I noticed the following things:

Stacktrace

. . . , , , , <cfinclude>, .

stacktrace

2500 , - 29727 . TTFB TTLB 29726 , 2 1 . - 76 (19 ).

, funcCONSTRUCTFOOTER.getAccess - Java- return 0; ( access <cffunction>), , 23 . /, .

: stacktrace stacktrace stacktrace

JVM (Java HotSpot(TM) 64-Bit Server VM, 1.8.0_121)

-server
-Xms24G
-Xmx48G
-Xss4m
-XX:MaxMetaspaceSize=2G
-XX:+TieredCompilation
-XX:ReservedCodeCacheSize=2G
-XX:+UseCompressedOops
-XX:+UseG1GC
-XX:MaxGCPauseMillis=100
-Xbatch 

ColdFusion (10.0.22.283922, 22)

Maximum number of simultaneous Template requests: 40
Maximum number of cached templates: 40000 (~14500 cached according to monitor)
Trusted cache: true
Cache template in request: true
Component cache: true
Save class files: true

<Connector port="8012" protocol="AJP/1.3" redirectPort="8445" tomcatAuthentication="false" maxThreads="500" connectionTimeout="60000" />

worker.list=cfusion
worker.cfusion.type=ajp13
worker.cfusion.host=localhost
worker.cfusion.port=8012
worker.cfusion.connection_pool_size=500
worker.cfusion.max_reuse_connections=250
worker.cfusion.connection_pool_timeout=60

metrics.log 35 75 . 90% , . Max threads: 500 Current thread count: 70 Current thread busy: 64.

? ?

+4

Source: https://habr.com/ru/post/1669464/


All Articles