Quantcast
Channel: Lucee Dev - Latest topics
Viewing all articles
Browse latest Browse all 465

Performance issue with Lucee, AJP, and IIS

$
0
0

I’m migrating my system from ACF to Lucee. I’m finding it amazing to have some new possibilities, considering I’ve been on ACF 2016. However, I’ve been facing an issue that I can’t solve for more than 15 days. Currently, my ACF server runs on a Windows server using IIS. We have individual connectors for each site, and for over 4 years, I haven’t encountered any performance problems; it works perfectly. As ACF has a very high cost, we decided to switch to Lucee. We’ve been making small adjustments to our code for about 6 months to make it run 100%, and we succeeded! =]

The problem is that we are unable to get the Lucee server to respond at the same speed as we do with ACF. I’ll include performance screenshots below to help you understand what I’m talking about.

I’m running a test with a CFM file containing:

<cfset = “test”>
<cfoutput>
    #variables.test#
</cfoutput>

Conducting a test through K6 simulating 1000 VUs for 1 minute.

Windows - ACF 2016 - IIS


Checks: 217.386
http_req_waiting: 276.37ms

Windows - Lucee - IIS


Checks: 21.464
http_req_waiting: 2.81s

Windows - IIS (HTML text)


Checks: 337.681
http_req_waiting: 177.74ms

Windows - Lucee - without the IIS, consequently without the connector


Checks: 204.170
http_req_waiting: 293.63ms

For me, as a beginner with Lucee, it becomes evident that when there is a connection from Lucee to IIS, the bottleneck causing delays is in the connector. Below are the server.xml configurations

<Server port="8005" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
  <GlobalNamingResources>
    <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>
  <Service name="Catalina">
    <Connector port="8888" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
    <Connector 
		protocol="AJP/1.3" 
		port="8009" 
		packetSize="65536" 
		secret="xxxx" 
		secretRequired="true" 
		redirectPort="8443" 
		address="::1" 
		maxConnections="10000" 
		MaxThreads="5000" 
	/>
    <Engine name="Catalina" defaultHost="127.0.0.1">
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
      </Realm>
      <Host name="127.0.0.1"  appBase="webapps" unpackWARs="true" autoDeploy="true">
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log" suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b" />
		<Valve className="mod_cfml.core" loggingEnabled="false" maxContexts="200" timeBetweenContexts="2000" scanClassPaths="false" responseCode="307" sharedKey="xxxx" />
      </Host>
    </Engine>
  </Service>
</Server>

BonCodeAJP13.settings

<Settings>
<Server>localhost</Server>
<Port>8009</Port>
<EnableRemoteAdmin>True</EnableRemoteAdmin>
<EnableHeaderDataSupport>True</EnableHeaderDataSupport>
<ForceSecureSession>False</ForceSecureSession>
<AllowEmptyHeaders>False</AllowEmptyHeaders>
<ModCFMLSecret>xxx</ModCFMLSecret>
<RequestSecret>xxxx</RequestSecret>
<MaxConnections>1000</MaxConnections>
<PacketSize>65536</PacketSize>
<EnableAggressiveGC>true</EnableAggressiveGC>
<FlushThreshold>1</FlushThreshold>
</Settings>

“The question is, what should be done to achieve results similar to ACF?”

Thanks

OS: Windows Server 2022 Standard
Java Version: 11.0.20.1
Tomcat Version: 9.0.80
Lucee Version: 6.0.0.585

7 posts - 5 participants

Read full topic


Viewing all articles
Browse latest Browse all 465

Trending Articles