Hi,
I've been using litespeed for some time now, but since about 2-3 days ago, one of the servers started having loading problems. At first I thought it was being atacked, but then I noticed that there were a lot of http processes used(around 300-350) and the load was at a constant 10-12. Normally I wouldn't get alarmed because it's not such a high load, but clients started reporting that the websites backends(wp-admin for example) took forever to load.
Could you please advise what I can tweak so admin backends start loading normally?(I'm guessing it's because the load exceeds the normal value of smaller than 8). MySQL is not a bottleneck, it has 2000 available connections and the average load is 1-1,5.
In peak times, the server has around 350-400 processes:
This is a load average from today:
The hardware setup is as follows:
1.Http server(Cpanel)
1 x Intel Xeon(quad-core)
8 Gb RAM
4 x 1 TB HDD in RAID 10
2. MySQL server
1 x Intel Xeon(quad-core)
16 Gb RAM
2 x 150 Gb HDD(SAS) in RAID 1
My litespeed config is as follows:
I cut it short because that's all that I need to tune. I don't use Ruby.
I've been using litespeed for some time now, but since about 2-3 days ago, one of the servers started having loading problems. At first I thought it was being atacked, but then I noticed that there were a lot of http processes used(around 300-350) and the load was at a constant 10-12. Normally I wouldn't get alarmed because it's not such a high load, but clients started reporting that the websites backends(wp-admin for example) took forever to load.
Could you please advise what I can tweak so admin backends start loading normally?(I'm guessing it's because the load exceeds the normal value of smaller than 8). MySQL is not a bottleneck, it has 2000 available connections and the average load is 1-1,5.
In peak times, the server has around 350-400 processes:
Code:
ps -ef|wc
358 3092 25232
Code:
07:00:01 AM runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15
09:00:03 AM 6 1201 6.33 7.41 7.55
09:10:01 AM 16 1210 6.97 7.33 7.49
09:20:02 AM 17 1188 9.76 9.22 8.36
09:30:01 AM 39 1243 9.51 8.37 8.21
09:40:01 AM 9 1182 7.27 8.08 8.18
09:50:01 AM 4 1207 11.87 9.68 8.90
10:00:01 AM 24 1207 8.66 9.88 9.44
10:10:01 AM 4 1216 10.31 10.75 10.14
10:20:03 AM 29 1249 11.44 11.28 10.64
10:30:02 AM 11 1245 11.18 10.96 10.78
10:40:02 AM 19 1201 8.88 9.93 10.31
10:50:01 AM 18 1202 12.02 11.41 10.71
11:00:01 AM 8 1205 11.44 9.89 10.02
11:10:01 AM 14 1188 8.34 9.49 9.83
11:20:02 AM 25 1217 10.42 9.51 9.65
11:30:01 AM 6 1214 6.99 8.35 9.07
11:40:01 AM 6 1210 8.40 8.59 8.76
11:50:02 AM 19 1257 9.30 10.58 9.86
12:00:01 PM 13 1233 9.34 9.37 9.43
12:10:01 PM 13 1233 7.44 9.34 9.62
12:20:01 PM 6 1247 5.84 7.28 8.56
12:30:02 PM 13 1258 7.87 7.46 7.94
Average: 13 1177 6.34 6.57 6.59
1.Http server(Cpanel)
1 x Intel Xeon(quad-core)
8 Gb RAM
4 x 1 TB HDD in RAID 10
2. MySQL server
1 x Intel Xeon(quad-core)
16 Gb RAM
2 x 150 Gb HDD(SAS) in RAID 1
My litespeed config is as follows:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<httpServerConfig>
<serverName>$HOSTNAME</serverName>
<user>nobody</user>
<group>nobody</group>
<priority>10</priority>
<chrootPath>/</chrootPath>
<enableChroot>0</enableChroot>
<enableLVE>2</enableLVE>
<inMemBufSize>2548M</inMemBufSize>
<swappingDir>/tmp/lshttpd/swap</swappingDir>
<autoRestart>1</autoRestart>
<autoFix503>1</autoFix503>
<gracefulRestartTimeout></gracefulRestartTimeout>
<loadApacheConf>1</loadApacheConf>
<autoReloadApacheConf>2</autoReloadApacheConf>
<apacheBinPath>/usr/local/apache/bin/httpd</apacheBinPath>
<apacheConfFile>/usr/local/apache/conf/httpd.conf</apacheConfFile>
<apachePortOffset>0</apachePortOffset>
<apacheIpOffset>0</apacheIpOffset>
<apacheHandledContent></apacheHandledContent>
<apacheIgnoredModules></apacheIgnoredModules>
<phpSuExec>1</phpSuExec>
<phpSuExecMaxConn>15</phpSuExecMaxConn>
<apacheEnableFP></apacheEnableFP>
<apacheEnvVars></apacheEnvVars>
<mime>$SERVER_ROOT/conf/mime.properties</mime>
<disableInitLogRotation>1</disableInitLogRotation>
<showVersionNumber>0</showVersionNumber>
<enableIpGeo></enableIpGeo>
<useIpInProxyHeader>0</useIpInProxyHeader>
<autoUpdateInterval>86400</autoUpdateInterval>
<autoUpdateDownloadPkg>1</autoUpdateDownloadPkg>
<adminEmails>admin@keyhost.ro</adminEmails>
<adminRoot>$SERVER_ROOT/admin/</adminRoot>
<logging>
<log>
<fileName>/usr/local/apache/logs/error_log</fileName>
<logLevel>INFO</logLevel>
<debugLevel>0</debugLevel>
<rollingSize>2000M</rollingSize>
<enableStderrLog>1</enableStderrLog>
</log>
<accessLog>
<fileName>$SERVER_ROOT/logs/access.log</fileName>
<rollingSize>2000M</rollingSize>
<keepDays>30</keepDays>
<compressArchive>0</compressArchive>
</accessLog>
</logging>
<indexFiles>index.html, index.php, index.php5, index.htm</indexFiles>
<autoIndex>1</autoIndex>
<autoIndexURI>/_autoindex/default.php</autoIndexURI>
<htAccess>
<allowOverride>31</allowOverride>
<accessFileName>.htaccess</accessFileName>
</htAccess>
<expires>
<enableExpires>1</enableExpires>
<expiresByType>image/*=A604800, text/css=A604800, application/x-javascript=A604800, application/javascript=A604800</expiresByType>
</expires>
<tuning>
<maxConnections>1000</maxConnections>
<maxSSLConnections>100</maxSSLConnections>
<connTimeout>120</connTimeout>
<maxKeepAliveReq>1</maxKeepAliveReq>
<smartKeepAlive>0</smartKeepAlive>
<keepAliveTimeout>3</keepAliveTimeout>
<sndBufSize>0</sndBufSize>
<rcvBufSize>0</rcvBufSize>
<eventDispatcher>best</eventDispatcher>
<maxCachedFileSize>16k</maxCachedFileSize>
<totalInMemCacheSize>128M</totalInMemCacheSize>
<maxMMapFileSize>2M</maxMMapFileSize>
<totalMMapCacheSize>1024M</totalMMapCacheSize>
<useSendfile>1</useSendfile>
<useAIO>2</useAIO>
<AIOBlockSize>7</AIOBlockSize>
<fileETag>0</fileETag>
<SSLCryptoDevice>null</SSLCryptoDevice>
<maxReqURLLen>8K</maxReqURLLen>
<maxReqHeaderSize>4096</maxReqHeaderSize>
<maxReqBodySize>500M</maxReqBodySize>
<maxDynRespHeaderSize>8K</maxDynRespHeaderSize>
<maxDynRespSize>500M</maxDynRespSize>
<enableGzipCompress>1</enableGzipCompress>
<enableDynGzipCompress>1</enableDynGzipCompress>
<gzipCompressLevel>2</gzipCompressLevel>
<compressibleTypes>text/*, application/x-javascript, application/xml, application/javascript</compressibleTypes>
<gzipAutoUpdateStatic>1</gzipAutoUpdateStatic>
<gzipCacheDir>/home/loguri/gzip</gzipCacheDir>
<gzipStaticCompressLevel>6</gzipStaticCompressLevel>
<gzipMaxFileSize>1M</gzipMaxFileSize>
<gzipMinFileSize>32K</gzipMinFileSize>
</tuning>
<security>
<fileAccessControl>
<followSymbolLink>1</followSymbolLink>
<checkSymbolLink>0</checkSymbolLink>
<requiredPermissionMask>000</requiredPermissionMask>
<restrictedPermissionMask>000</restrictedPermissionMask>
</fileAccessControl>
<perClientConnLimit>
<staticReqPerSec></staticReqPerSec>
<dynReqPerSec></dynReqPerSec>
<outBandwidth>0</outBandwidth>
<inBandwidth>0</inBandwidth>
<softLimit>20</softLimit>
<hardLimit>50</hardLimit>
<blockBadReq>1</blockBadReq>
<gracePeriod>30</gracePeriod>
<banPeriod>5</banPeriod>
</perClientConnLimit>
</perClientConnLimit>
<CGIRLimit>
<cgidSock></cgidSock>
<maxCGIInstances>20</maxCGIInstances>
<minUID>11</minUID>
<minGID>10</minGID>
<forceGID></forceGID>
<priority>-15</priority>
<CPUSoftLimit>0</CPUSoftLimit>
<CPUHardLimit>0</CPUHardLimit>
<memSoftLimit></memSoftLimit>
<memHardLimit></memHardLimit>
<procSoftLimit>20</procSoftLimit>
<procHardLimit>25</procHardLimit>
</CGIRLimit>
<censorshipControl>
<enableCensorship>1</enableCensorship>
<logLevel>0</logLevel>
<defaultAction>deny,log,status:403</defaultAction>
<scanPOST>0</scanPOST>
<disableSecHtaccess></disableSecHtaccess>
<secAuditLogEngine></secAuditLogEngine>
<secAuditLog>/home/loguri/sec_audit.log</secAuditLog>
</censorshipControl>
<accessDenyDir>
<dir>/</dir>
<dir>/etc/*</dir>
<dir>/dev/*</dir>
<dir>$SERVER_ROOT/conf/*</dir>
<dir>$SERVER_ROOT/admin/conf/*</dir>
</accessDenyDir>
<accessControl>
<allow>ALL</allow>
<deny></deny>
</accessControl>
</security>
<extProcessorList>
<extProcessor>
<type>lsapi</type>
<name>lsphp5</name>
<address>uds://tmp/lshttpd/lsphp5.sock</address>
<note></note>
<maxConns>300</maxConns>
<env>PHP_LSAPI_MAX_REQUESTS=100</env>
<env>PHP_LSAPI_CHILDREN=300</env>
<initTimeout>60</initTimeout>
<retryTimeout>0</retryTimeout>
<persistConn>0</persistConn>
<pcKeepAliveTimeout>5</pcKeepAliveTimeout>
<respBuffer>0</respBuffer>
<autoStart>1</autoStart>
<path>$SERVER_ROOT/fcgi-bin/lsphp5</path>
<backlog>100</backlog>
<instances>1</instances>
<extUser></extUser>
<extGroup></extGroup>
<runOnStartUp>0</runOnStartUp>
<extMaxIdleTime>2</extMaxIdleTime>
<priority>10</priority>
<memSoftLimit>256M</memSoftLimit>
<memHardLimit>312M</memHardLimit>
<procSoftLimit>200</procSoftLimit>
<procHardLimit>200</procHardLimit>
</extProcessor>