Tuning TIME_WAIT

转载 2015年07月07日 13:22:13

Optimizing TCP/IP Networking for API Clients

All Essbase C-API based clients communicate with the Essbase server by means of a network layer. A request from a client C-API based application to Essbase involves opening a TCP/IP socket at the start of the request and closing it at the end of the request. A socket is a resource managed by the operating system, and there are a fixed number of such resources - the number of which is operating-system specific. When a socket is closed, it enters a dormant state, referred to as TIME_WAIT state, for a duration that is operating-system specific and configurable. At the end of that time period, the socket can be reaped by the operating system for reuse. Whether a call to open a socket succeeds or not is a function of how rapidly the operating system is able to reap the closed sockets for reuse.

Problems may occur in cases where an API client is designed to make and conclude so many connections, so rapidly, that the fixed number of available ports (about 64,000) is at or near exhaustion. Because the used ports are still resting in TIME_WAIT state, available ports cannot be harvested fast enough by the operating system, and the result is that connections are denied or the program runs sluggishly. If a deployment expects highly concurrent processing and these symptoms are occurring, we recommend decreasing the TIME_WAIT delay for the operating system. For example, a significant performance improvement can result from decreasing the delay from four minutes to 30 seconds.

This situation can be detected by running the command netstat on the command prompt. The output shows the number of sockets that are in TIME_WAIT state. The higher the number, the larger the probability that certain subsequent API requests will fail.

To get around this situation, consider reducing the TIME_WAIT value on your operating system.

On Windows, the TIME_WAIT value is found in the Windows registry.

On UNIX, system tools such as ndd (Solaris & HPUX), no (AIX), and echo (Linux) are used to manipulate kernel parameters.

To view and adjust the TIME_WAIT value on Solaris and HP-UX,

ndd -get /dev/tcp tcp_time_wait_interval     
ndd -set /dev/tcp tcp_time_wait_interval 30000

On AIX, the following command gives a value for all parameters:

/usr/sbin/no -a 

Issue the following command on AIX to set TCP_TIMEWAIT state to 30 seconds (but do not adjust it if is already below 30):

/usr/sbin/no -o tcp_timewait =2
/usr/sbin/no -o tcp_ephemeral_low = 32768
/usr/sbin/no -o    tcp_ephemeral_high = 65535

On Linux, issue the following command to set the timeout_timewait parameter to 30 seconds:

echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout


转自:http://docs.oracle.com/cd/E10530_01/doc/epm.931/html_esb_api/tcpip.htm


Camera tuning 基础知识点

相关知识点总结: 一、模组及工艺相关知识      ①模组的组成           1)模组的基本组成。(AF&FF)           2)镜头----镜头的发展历史,镜头相关参数解析,...
  • suiyiwuhui
  • suiyiwuhui
  • 2017年06月05日 16:45
  • 1181

数据库性能优化(database tuning)性能优化绝不仅仅只是索引

本文从宏观上讨论了调优涉及的内容,也说明了调优不仅仅是索引的问题,这虽然对很多朋友来说很简单、很明显,但也许还有很多朋友不知道,希望通过这个短文普及下调优的常识。...
  • LHDZ_BJ
  • LHDZ_BJ
  • 2015年03月02日 15:32
  • 1355

大量TIME_WAIT的终极详解和解决方案

上篇笔记主要介绍了与TIME_WAIT相关的基础知识,本文则从实践出发,说明如何解决文章标题提出的问题。 1. 查看系统网络配置和当前TCP状态         在定位并处理应用程序出现的网络问题...
  • bingqingsuimeng
  • bingqingsuimeng
  • 2016年07月29日 14:42
  • 4080

TCP/IP详解--TCP连接中TIME_WAIT状态过多

TIMEWAIT状态本身和应用层的客户端或者服务器是没有关系的。仅仅是主动关闭的一方,在使用FIN|ACK|FIN|ACK四分组正常关闭TCP连接的时候会出现这个TIMEWAIT。服务器在处理客户端请...
  • yusiguyuan
  • yusiguyuan
  • 2014年03月18日 10:30
  • 49041

TCP/IP详解--TIME_WAIT状态详解

Socket中的TIME_WAIT状态 在高并发短连接的server端,当server处理完client的请求后立刻closesocket此时会出现time_wait状态然后如果client再并发...
  • yusiguyuan
  • yusiguyuan
  • 2014年03月18日 10:29
  • 5682

Oracle Tuning (Oracle 性能调整)的一些总结

Oracle Tuning (Oracle 性能调整)的一些总结 关于Oracle的性能调整,一般包括两个方面,一是指Oracle数据库本身的调整,比如SGA、PGA的优化设置,二是连接Oracle的...
  • jojojojo2002
  • jojojojo2002
  • 2014年11月28日 11:11
  • 729

netstat监控大量ESTABLISHED连接与Time_Wait连接问题

问题描述: 在不考虑系统负载、CPU、内存等情况下,netstat监控大量ESTABLISHED连接与Time_Wait连接。 # netstat -n | awk '/^tcp/ {++...
  • liuzhenwen
  • liuzhenwen
  • 2015年12月10日 09:33
  • 4825

TCP/IP TIME_WAIT状态原理和服务端过多原因分析

TCP/IP TIME_WAIT状态原理 (原文地址 http://elf8848.iteye.com/blog/1739571) 博客分类:  网络协议-TCP/HTTP   TIME_...
  • fei33423
  • fei33423
  • 2015年11月07日 16:21
  • 2001

深度网络 Fine-tuning方法简介

迁移学习有两种方式,一是卷积网络作为固定的特征提取器.拿到一个预训练好的卷积网络,去掉全连接层,吧其余的部分作为一个特征提取器.alex网络会计算一个4096D的特征向量,称之为cnn codes.有...
  • wendox
  • wendox
  • 2016年10月17日 17:36
  • 2775

Time-wait状态(2MSL)一些理解

1. 编写TCP/SOCK 服务时,SO_REUSEADDR到底是什么意思? 这个套接字选项通知内核,如果端口忙,但TCP状态处于TIME_WAIT,可以重用端口。如果端口忙,TCP状态处于其他状态...
  • overstack
  • overstack
  • 2013年04月22日 14:12
  • 5965
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Tuning TIME_WAIT
举报原因:
原因补充:

(最多只允许输入30个字)