LS3.0 scratches hard disk every second?

Discussion in 'General' started by phallstrom, Mar 20, 2007.

  1. phallstrom

    phallstrom Active Member

    Hi -

    I've installed LS 3.0 on my Mac for development and notice that it accesses the hard disk every second. Even if I'm not browsing any web pages it does this. And it never seems to stop.

    I've fiddled around with various log file settings, but nothing seems to help. Wondering if you have any ideas on what other setting it might be that is causing this to happen? Maybe some sort of cache setting perhaps?

    It's only annoying because my mac is otherwise quiet :)

  2. mistwang

    mistwang LiteSpeed Staff

    LSWS writes to a status report file under /tmp/lshttpd every second, it might be caused by that.
    On other OS, the file should be cached in memory and there is no real disk opteration. Maybe MacOS is special. :)
  3. phallstrom

    phallstrom Active Member

    I bet that is it.

    Anyway to tell it not to do that or is that a necessary requirement?
  4. mistwang

    mistwang LiteSpeed Staff

    No way to stop it at this moment, one possible solution is to mount a RAM disk at /tmp/lshttpd/ .
  5. phallstrom

    phallstrom Active Member

    Ram disk seems to be working! Here's a patch to lswsctrl (no checks for ensuring we're on osx though)...

    > ram_disk=`/usr/bin/hdid -nomount ram://2048`
    > /sbin/newfs_hfs $ram_disk
    > /bin/rm -rf /tmp/lshttpd
    > /bin/mkdir /tmp/lshttpd
    > /sbin/mount -t hfs $ram_disk /tmp/lshttpd
    > /sbin/umount /tmp/lshttpd
    > /usr/bin/hdiutil detach $ram_disk
    > sleep 1
    > ram_disk=`/bin/df | /usr/bin/grep /tmp/lshttpd | /usr/bin/cut -f1 -d" "`
    > /sbin/umount /tmp/lshttpd
    > /usr/bin/hdiutil detach $ram_disk

Share This Page