免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1153 | 回复: 0
打印 上一主题 下一主题

Filesystem Tuning Options [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-05-24 20:09 |只看该作者 |倒序浏览
也是加速Squid的
I have found four simple ways
to improve UFS performance for Squid. Some of these are specific to
certain operating systems, such as BSD and Linux, and may not be
available on your platform:

  • Some UFS implementations support a noatime mount option. Filesystems mounted with noatime don't update the inode access time value for reads. The easiest way to use this option is to add it to the /etc/fstab like this:
    # Device            Mountpoint    FStype  Options        Dump    Pass#
    /dev/ad1s1c         /cache0       ufs     rw,noatime     0       0

  • Check your mount(8) manpage for the async
    option. With this option set, certain I/O operations (such as directory
    updates) may be performed asynchronously. The documentation for some
    systems notes that it is a dangerous flag. Should your system crash,
    you may lose the entire filesystem. For many installations, the
    performance improvement is worth the risk. You should use this option
    only if you don't mind losing the contents of your entire cache. If the
    cached data is very valuable, the async option is probably not for you.

  • BSD has a feature called soft updates. Soft updates are BSD's alternative to journaling filesystems.
    [1]
    On FreeBSD, you can enable this option on an unmounted filesystem with the tunefs command:
    [1]
    For further information, please see "Soft Updates: A Technique for
    Eliminating Most Synchronous Writes in the Fast File System" by
    Marshall Kirk McKusik and Gregory R. Ganger. Proceedings of the 1999 USENIX Annual Technical Conference, June 6-11, 1999, Monterey, California.
    # umount /cache0
    # tunefs -n enable /cache0
    # mount /cache0

  • You only have to run the tunefs once for each filesystem. Soft updates are automatically enabled on the filesystem again when your system reboots.
    On OpenBSD and NetBSD, you can use the softdep mount option:
    # Device            Mountpoint    FStype  Options        Dump    Pass#
    /dev/sd0f           /usr          ffs     rw,softdep     1       2


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/2389/showart_27565.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP