Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1453711
  • 博文数量: 297
  • 博客积分: 10010
  • 博客等级: 上将
  • 技术积分: 3082
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 11:36
文章分类

全部博文(297)

文章存档

2011年(1)

2009年(45)

2008年(67)

2007年(184)

我的朋友

分类: LINUX

2008-05-12 09:17:54

一.文件系统调节


1.硬盘不要使用RAID

2.使用性能好的FS(例如: ReiserFS)

在fstab里面添加noatime,async项,提高文件系统的性能.

二. aufs存储机制

编辑squid-2.6.STABLE13/src/fs/aufs/store_asyncufs.h

#define ASYNC_WRITE 0 (把0修改为:1)

pthread_create(), SMP优越. (线程制)

编辑squid-2.6.STABLE13/include/autoconf.h

define DEFAULT_FD_SETSIZE 1024{1024修改为:65536}

diskd存储机制

通过消息队列和共享内存来实现进程间通信

使用Diskd存储机制而对 kernel.msgmnb等的调整

kernel.msgmnb = 16384

每个消息队列的最大字节限制

kernel.msgmni = 16 (此值可以根据需要增大)

整个系统的最大数量的消息队列, Squid对每个Cache_dir 使用两个队列, 假如你有2个磁盘,那就有2个队列.

kernel.msgmax = 8192

每个消息的最大size.

[root@jackbillow~]# sysctl -a |grep msgmnb
kernel.msgmnb = 16384
[root@jackbillow ~]# sysctl -a |grep msgmni
kernel.msgmni = 16
[root@jackbillow ~]# sysctl -a |grep msgmax
kernel.msgmax = 8192
[root@jackbillow ~]# sysctl -a |grep shmall
kernel.shmall = 2097152
[root@jackbillow ~]# sysctl -a |grep shmmni
kernel.shmmni = 4096
[root@jackbillow~]# sysctl -a |grep shmmax
kernel.shmmax = 2147483648
阅读(1327) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~