lshttpd using constant CPU even when not in use

closet geek

Well-Known Member
#1
Hi,

We are using lsws, but it is not yet active in the sense that it is serving any pages. I note that the lshttpd process is still consuming between 0.7%-1.5% CPU at all times even though LiteSpeed is not serving any content at all.

I straced the process and I see the problem is this file:

/tmp/lshttpd/.rtreport

Is constantly being written to (literally always). This seems to be throttling related, however as this is causing overhead on both CPU and disk can it be stopped?

Thanks.
 

mistwang

LiteSpeed Staff
#2
LSWS update the real time status via that file regularly, we may change it to another way to provide the information on demand in the future.
So, it is not possible to turn it off now, however, if you want to avoid disk operation, you can mount a small ram disk at /tmp/lshttpd/ .
 

closet geek

Well-Known Member
#3
Thanks for your reply. I would say it's odd that the real time stats are updated to 0 constantly instead of an update being triggered when a connection is made (e.g. how the access logs work).
 

closet geek

Well-Known Member
#5
LSWS update the real time status via that file regularly, we may change it to another way to provide the information on demand in the future.
Is this a definite change for a future 4.0 beta? I really dislike unnecessary disk usage and logging that nothing is happening is definitely unnecessary!
 
Last edited:

TomBG

Active Member
#15
But it's loading from memory, no?

No. Not if it's just a typical swap file/drive/partition. A RAM disk is something completely different. In FreeBSD they're referred to as "memory disks" and work like other mount points except you're allocating RAM to create a drive instead of pointing to a physical drive. I'm not sure what OS you're running but you might want to "man mount".
 

anewday

Well-Known Member
#17
George, I was thinking that it's a good idea to add an option to disable real-time stats. I would venture to say that most don't use it that much. They can enable it when needed.
 

GaryT

Active Member
#19
where in the options within WHM plugin is that - I looked and could not find it - I have LSWPHP5 high loads - Alot of them at times and I do think the logs could be an issue.
 
Top