zoukankan      html  css  js  c++  java
  • LVS改变ConnectionHashtable值

    一、软件包

    a) kernel-2.6.18-164.el5.src.rpm

    二、安装步骤

    a) Rpm –ivh kernel-2.6.18-164.el5.src.rpm

    b) Cd /usr/src/redhat/

    c) Cp /boot/config-2.6.18-164.el5PAE SOURCE/ kernel-2.6.18-i686.config

    d) Vi SOURCE/ kernel-2.6.18-i686.config

    e) 把第一行#改成# x386

    f) 修改CONFIG_IP_VS_TAB_BITS=12 (2的12次方,4096)为 CONFIG_IP_VS_TAB_BITS=20

    g) Cd SPECS

    h) Rpmbuild –ba kernel-2.6.spec

    i) Cd ../RPMS/X386/

    j) Rpm –ivh kernel-2.6.18-164.el5.rpm

    k) Vi /etc/grub.conf

    l) 修改default=0为1

    m) 重启服务器

    n) Ipvsadm由以前的

    o) IP Virtual Server version 1.0.12 (size=4096)

    p) 改变成IP Virtual Server version 1.2.1 (size=1048576)

    q) 编译内核的过程超漫长,差不多需要40分钟左右。

    三、附加

    a) Ipvsadm –timeout 100 80 100

    b) Ipvsasdm –ln –settimeout

    c) The IPVS connection hash table uses the chaining scheme to handle

    hash collisions. Using a big IPVS connection hash table will greatly

    reduce conflicts when there are hundreds of thousands of connections

    in the hash table.

    Note the table size must be power of 2. The table size will be the

    value of 2 to the your input number power. The number to choose is

    from 8 to 20, the default number is 12, which means the table size

    is 4096. Don't input the number too small, otherwise you will lose

    performance on it. You can adapt the table size yourself, according

    to your virtual server application. It is good to set the table size

    not far less than the number of connections per second multiplying

    average lasting time of connection in the table. For example, your

    virtual server gets 200 connections per second, the connection lasts

    for 200 seconds in average in the connection table, the table size

    should be not far less than 200x200, it is good to set the table

    size 32768 (2**15).

    Another note that each connection occupies 128 bytes effectively and

    each hash entry uses 8 bytes, so you can estimate how much memory is

    needed for your box.

  • 相关阅读:
    c3p0、dbcp、proxool、BoneCP比较
    velocity的一些优化记录
    JUnit-4.11使用报java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing错误
    Deployment failure on Tomcat 7.x. Could not copy all resources to
    Spring3.2.3+Quartz2.2.1 整合配置
    mysql批量insert速度超慢
    Fine Uploader + Spring3.2.2(Java+html5上传) SpringMVC+jquery-fineuploader 文件上传
    实现工资的按天统计(X:日期 Y:姓名)
    Java发邮件带附件(且重命名附件)
    微信小程序wx.switchTab传参问题
  • 原文地址:https://www.cnblogs.com/witer666/p/1911686.html
Copyright © 2011-2022 走看看