Share/etc/sysctl. conf and/boot/loader. conf Optimization

Source: Internet
Author: User
 
4.3 FreeBSD Network Optimization

# Vi/etc/sysctl. conf
======================================================== ======
Net. inet. IP. check_interface = 1
Net. inet. tcp. blackhole = 2
Net. inet. UDP. blackhole = 1
Net. inet. tcp. recvspace = 65535
Net. inet. tcp. sendspace = 65535
Kern. IPC. somaxconn = 32768
Kern. IPC. maxsockbuf = 2097152
Net. inet. IP. Redirect = 1
Net. inet. ICMP. icmplim = 100
Net. inet. tcp. always_keepalive = 1
Net. inet. tcp. delayed_ack = 1
Net. inet. UDP. maxdgram = 65535
Net. Local. Stream. sendspace = 65535
Net. Local. Stream. recvspace = 65535
Kern. maxfiles = 65536
Kern. maxfilesperproc = 65536
Net. inet. UDP. checksum = 1
Net. inet. tcp. MSL = 7500
Net. inet. tcp. syncookies = 1
Kern. securelevel = 0
Net. inet. ICMP. bmcastecho = 0
Net. inet. ICMP. maskrepl = 0
======================================================== ======
# Vi/boot/loader. conf
======================================================== ======
Kern. maxdsiz = "536870912" // this parameter is not required when your memory is smaller than MB
Kern. IPC. maxsockets = "4008"
Kern. IPC. nmbclusters = "32768"
Kern. IPC. nmbufs = "65535"
Kern. IPC. nsfbufs = "2496"
Net. inet. tcp. tcbhashsize = "2048"
 
 
 

/Boot/loader. conf

 

Kern. maxdsiz = "536870912"
Kern. IPC. maxsockets = "16424"
Kern. IPC. nmbclusters = "32768"
Kern. IPC. nmbufs = "65535"
Kern. IPC. nsfbufs = "2496"
Net. inet. tcp. tcbhashsize = "2048"
Kern. maxusers = "256"

 

/Etc/sysctl. conf

 

Net. inet. IP. sourceroute = 0
Net. inet. IP. accept_sourceroute = 0
Net. inet. tcp. drop_synfin = 1
Kernel. maxvnodes = 100000
Kern. maxprocperuid = 867
Kern. maxfiles = 65536
Kern. argmax = 262144
Kern. securelevel =-1
Kern. maxfilesperproc = 1735
Kern. IPC. maxsockbuf = 262144
Kern. IPC. somaxconn = 8192
Kern. IPC. shmmax = 33554432
Kern. IPC. Shmall = 8192
Kern. IPC. shm_use_phys = 0
Kern. IPC. shm_allow_removed = 0
Kern. coredump = 1
Kern. corefile = % N. Core
VM. swap_idle_enabled = 0
VM. swap_idle_threshold1 = 2
VM. swap_idle_threshold2 = 10
VFS. UFS. dirhash_maxmem = 2097152
VFS. vmiodirenable = 1
VFS. hirunningspaces = 1048576
VFS. write_behind = 1
Net. Local. Stream. sendspace = 65536
Net. inet. IP. portrange. lowfirst = 1023
Net. inet. IP. portrange. lowlast = 600
Net. inet. IP. portrange. First = 49152
Net. inet. IP. portrange. Last = 65535
Net. inet. IP. portrange. hifirst = 49152
Net. inet. IP. portrange. hilast = 65535
Net. inet. IP. Redirect = 1
Net. inet. IP. rtexpire = 3600
Net. inet. IP. rtminexpire = 10
Net. inet. IP. intr_queue_maxlen = 50
Net. inet. IP. intr_queue_drops = 0
Net. inet. IP. random_id = 0
Net. inet. ICMP. icmplim = 200
Net. inet. ICMP. icmplim_output = 1
Net. inet. ICMP. drop_redirect = 0
Net. inet. ICMP. log_redirect = 0
Net. inet. tcp. mssdflt = 512
Net. inet. tcp. minmss = 216
Net. inet. tcp. keepidle = 7200000
Net. inet. tcp. sendspace = 32768
Net. inet. tcp. recvspace = 65536
Net. inet. UDP. maxdgram = 9216
Net. inet. UDP. recvspace = 42080
Net. inet. tcp. log_in_vain = 0
Net. inet. tcp. blackhole = 2
Net. inet. tcp. delayed_ack = 1
Net. inet. tcp. inflight. DEBUG = 0
Net. inet. tcp. inflight. rttthresh = 10
Net. inet. tcp. inflight. min = 6144
Net. inet. tcp. inflight. max = 1073725440
Net. inet. tcp. inflight. Stab = 20
Net. inet. tcp. MSL = 30000
Net. inet. tcp. always_keepalive = 1
Net. inet. UDP. log_in_vain = 0
Net. inet. UDP. blackhole = 1
Net. inet. Raw. maxdgram = 8192
Net. inet. Raw. recvspace = 8192
Net. Link. Ether. inet. max_age = 1200
Net. inet6.ip6. Redirect = 1
Net. ISR. Direct = 0
HW. ata. WC = 1
Security. BSD. see_other_uids = 1
Security. BSD. see_other_gids = 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.