lshttpd using constant CPU even when not in use

Discussion in 'General' started by closet geek, Oct 30, 2008.

  1. closet geek

    closet geek New Member

    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.
  2. mistwang

    mistwang LiteSpeed Staff

    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/ .
  3. closet geek

    closet geek New Member

    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).
  4. anewday

    anewday Moderator

    Yeah, I think it's best to change how it updates. Less disk writes are better. :p
  5. closet geek

    closet geek New Member

    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: Dec 2, 2008
  6. anewday

    anewday Moderator

    He said it will be changed in 4.0 versions.
  7. anewday

    anewday Moderator

    Has this been changed in the latest 4.0 beta?
  8. mistwang

    mistwang LiteSpeed Staff

    No, it has not been changed yet.
  9. anewday

    anewday Moderator

    Hope you find a solution to this, it just doesn't sit well with me that the hdd is constantly being written to.
  10. mistwang

    mistwang LiteSpeed Staff

    temp solution is simple, mount a RAM disk at /tmp/lshttpd , move swapping directory from /tmp/lshttpd/swap to somewhere else.
  11. anewday

    anewday Moderator

    I only changed Swapping Directory to /dev/shm or should it be /dev/shm/swap ? Is this enough?
  12. anewday

    anewday Moderator

    Any updates to this?
  13. TomBG

    TomBG New Member

    That's swap, not a RAM disk.
  14. anewday

    anewday Moderator

    But it's loading from memory, no?
  15. TomBG

    TomBG New Member


    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".
  16. anewday

    anewday Moderator

  17. anewday

    anewday Moderator

    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.
  18. anewday

    anewday Moderator

    George, have you thought about disabling real-time stats option?
  19. GaryT

    GaryT New Member

    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.
  20. mistwang

    mistwang LiteSpeed Staff

    It will be served via a special URL when required, like mod_status in Apache.

Share This Page