varnish优化选项
来源:互联网 发布:超大容量双肩包 知乎 编辑:程序博客网 时间:2024/06/05 15:36
Vvarnish settings
To see further description of these settings, also check param.show -l in the Varnish management interface.
- -p thread_pool_min=200 (default: 5)
Idle threads are harmless. This number is multipled by the number of thread pools you have available, and the total should be roughly what you need to run on a normal day.
- -p thread_pool_max=4000 (default 1000)
The maximum number of threads is in essence limited by available file descriptors, however, setting it too high does not increase performance. Having a number of idle threads is reasonably harmless, but do not increase this number above roughly 5000 or you risk running into file-descriptor related issues, among other things.
- -p thread_pool_add_delay=2 (default: 20ms, default in master: 2ms)
Reducing the add_delay lets you create threads faster which is essential - specially at startup - to avoid filling up the queue and dropping requests.
- -p session_linger=100 OR MORE (default: 0ms in <= 2.0.4 and 50ms in > 2.0.4)
To avoid too much context switching when you starve your CPU (and in general), letting each thread wait for new requests is essential. The value depends on how long it takes you to deliver the typical object. This will also reduce the amount of threads piling up (which is somewhat counter intuitive).
- -s malloc,(YOURMEMORY-20%)G
Keep data in memory using -s malloc.
VCL Setting
Enable grace period (varnish serves stale (but cacheable) objects while retriving object from backend)
in vcl_recv:
set req.grace = 30s;
in vcl_fetch:
set obj.grace = 30s;
- varnish优化选项
- varnish linux 内核优化
- Varnish的系统优化
- Varnish的系统优化
- Varnish
- Varnish
- Varnish
- varnish
- varnish
- Varnish
- varnish
- varnish
- varnish
- Varnish
- varnish
- varnish
- varnish
- varnish
- TabHost的用法
- linux之 grep命令
- C++ 之 构造函数与析构函数
- 如何把android后台应用调到前台
- 使用C#进行点对点通讯和文件传输
- varnish优化选项
- 基于visual Studio2013解决C语言竞赛题之1070删除相同节点
- python 函数小结
- php适用于windows的fnmatch(匹配函数),可匹配中文。
- Linux gzip,tar 命令
- ubunto下安装mono
- 开始
- 关于 overridePendingTransition()使用
- jquery实现动态加载select下拉框