Understanding RAM Disk Path setting

You may experience high I/O load issue on your server and wondering if RAM Disk Path (setting under configuration→server→tuning→RAM Disk Path. ) would help and what kind of data will be stored to RAM Disk if it is set. Actually this setting is only for LSWS real time stats data, not for swapping directory or anything else. Mitigation to your server high I/O issue may be very limited.

General speaking, LiteSpeed web server uses its own virtual memory to reduce the system memory usage. Virtual memory and disk swapping are used to store big request bodies and dynamically generated responses. This Swap Directory is different than OS swap directory and can be set to your RAM disk through LSWS setting. While OS Swap Directory can be set on OS level.GZIP Compression Static GZIP Cache Directory can also be set to RAM Disk. PHP session path can also be set to RAM disk through php.ini as well.

Overall LSWS has been optimized for most of the scenarios. Occasionally, if your server is constantly dealing with dynamic content with request/response body larger than 1MB, LSWS may use temporary file to store the body data, which could increase disk I/O activities and cause higher I/O wait. However, it rarely happens.

Higher I/O wait is normally caused by higher disk I/O activities. There could be caused by many factors. Good practice is to identify where the disk I/O activities coming from instead of setting everything above without knowing the root cause. You may run iotop command to find out more, or do some strace on the process which generates a lot of disk I/O. Once root cause identified, it may be easy to fix the problem accordingly.

  • Admin
  • Last modified: 2015/06/01 15:24
  • by Jackson Zhang