ARCSDE Connection number setting and its performance description
In the ARCSDE practical application process, the user's business demand is generally the multi-user concurrent operation, this is also ARCSDE distinguishes from the file Geodatabase the sign function, the multi-user operation is also multiple sessions concurrent connection, then the ARCSDE connection number appears especially important.
If the user in the process of use will often report the following error:
"Failedto Connect to database. Maximum number of conections to instance exceeded ".
Generally encountered this situation is often restarted arcsde service, but over time the system will report the following error, then in the arcsde work, what aspects to affect the number of connections.
restrictions on number of connections
Based on the figure above (in the case of Windows operating system, ARCSDE and database are installed on one machine), we see that if this is a ARCSDE database server, the other clients to connect to this machine, first we are into the operating system, Then it is through ArcSDE to connect Oracle database, then we can understand that the operating system, ArcSDE, database has a limit of the number of connections, of course, according to the "bucket principle", in these three connections, the default is the number of ArcSDE connections is the smallest, so when the number of connections not enough to use , the first report is the problem of the number of ARCSDE connections shown above. number of ARCSDE connections
The number of ARCSDE connections is 48 on the Windows operating system and 64 on non-Windows operating systems. We can query through the ARCSDE command.
C:\users\gis>sdeconfig-o list-p connections-i esri_sdeora-s lish-u sde-p sde ArcSDE 10.0 for
oracle11g build 1 343 Thu Feb 11:45:42 SDE
Server Configuration Tool Administration Utility
-------------------- ---------------------------------
Connections 48
We can modify these values through the ARCSDE command.
C:\users\gis>sdeconfig-o alter-vconnections=64-i esri_sdeora-s lish-u sde-p sde ArcSDE 10.0 for
oracle11g Bui LD 1343 Thu Feb 11:45:42 SDE
Server Configuration Tool Administration Utility
--------------- --------------------------------------
Alter server_config Table. Are you sure? (y/n): Y
successfully altered Server_config Table.
number of Windows connections in Windows, the ArcSDE service starts in the form of a non-interactive desktop. The Windows initialization parameter named SharedSection is used to set the heap memory upper bound value assigned to the Non-interactive desktop.
The maximum available heap memory value for all desktops is MB, whether it is an interactive desktop or a non-interactive desktop. Due to the limited amount of memory, we should pay attention to adjust the sharedsection parameters. If the ArcSDE service is started with a domain account, Gsrvr.exe assigns a non interactive desktop heap size of $ KB from the desktop, dedicated to ArcSDE services. If the ArcSDE service is started with a LocalSystem account, Gsrvr.exe assigns a non-interactive desktop heap of size KB to the shared desktop, dedicated to all services running in LocalSystem. If the ArcSDE service is started with a LocalSystem account (using the Allow service and desktop interaction enabled), Gsrvr.exe assigns a 3 MB interactive desktop heap from the default desktop. The solution solution depends on the ArcSDE platform. There is currently no way to determine the amount of memory that is used by a single desktop, or to determine how far the global pool is remaining.
Change the SharedSection parameter in the registry.
Estimate the number of gsrvr required. For clients like ArcView, Arceditor, and Arcexplorer, a gsrvr typically represents a ArcSDE connection. For ArcIMS, the number of gsrvr depends on the type of service. Assuming that each space server CPU has two virtual server threads, the following is a generic formula:
(2 Image Service threads * Total CPUs) + (numberof query server threads)
For example: (2 * 8) + 8 = 24 Gsrvr, this recommendation also assumes the use of image and query services, and that all AXL are connected to the ArcSDE server with the same user and database. If you have a different database or user referenced in your AXL, the formula is as follows:
(#databases * #mapservice threads) + (#dbs * #queryservices)
If the number of GSRVR exceeds the default connections setting in the-ARCSDE server_config table-Consider whether to change some of these connections to direct connections or to increase the third sharedsection parameter in the registry. Because a direct connection is running on a thread in the client process, the desktop is not assigned to the ArcSDE server.
Warning: It is recommended that you back up your operating system and files, including the registry, before proceeding with the operation.
\\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems
The string contains the startup parameters for Windows. The string contains the SharedSection parameter. The default value is 1024,3072,512. Where the third parameter is the heap memory upper bound value assigned to the Non-interactive desktop. By default, it is set to either 1 MB or KB. If you use this setting, a ArcSDE service can accept approximately 56 connections. If the maximum heap size of the non-interactive desktop is increased to 2 MB, the ArcSDE service can accept up to 270 connections. If the non-interactive heap size is set to 2 MB (2048KB), the SharedSection value is 1024,3072,2048.
Note that this value should not be modified too large, or an error will occur.
Once the sharedsection is changed, the server must be restarted.
Explain
Windows xp:sharedsection=1024,3076,512
windows7:sharedsection=1024,20480,768
Number of Oracle connections
The number of connections to Oracle is typically set by processes parameters and sessions parameters.
Sql> Show parameter Processes
NAME TYPE VALUE
------------------------------------------------ --------------
aq_tm_processes integer 0
db_writer_processes integer 1
gcs_server _processes integer 0
global_txn_processes integer 1
job_queue_processes Integer 1000
log_archive_max_processes integer 4
processes integer 150
The number of connections to Oracle (sessions) is related to the number of processes (process) in its parameter file, and their relationships are as follows:
Sessions= (1.1*process+5)
To modify the number of connections through SQL statements
Sql> alter system set processes=300scope=spfile;
The system has changed.
why the number of ARCSDE connections will increase
How to see, this sentence is nonsense, in fact, want to express is, why my user connection is clearly less than 48, maybe a few or more than 10, but the system will often hint has exceeded the maximum number of connections, this is why.
Then we need to understand a noun called "Orphaned gsrvr Process" (orphaned or disconnected), where the user may cause a panic or a prolonged failure in the working process being connected. Then users often take the direct use of Task Manager to kill ArcMap or Arccatalog process, then in the system are often killed in the implementation but ARCSDE still think it is a connection, this connection will still occupy the number of connections, so this situation is more and more, Then the number of connections becomes larger and bigger, and this problem arises.
We can use the ARCSDE command to query these invalid connections
C:\users\gis>sdemon-o info-i Users
Using this command we can query that if the connection time was a few months ago, these connections could be invalid connections. How to clear these invalid connections.
Using the ARCSDE parameter modification, you can clear these so-called invalid connections.
C:\users\gis>sdeconfig- o alter-v tcpkeepalive=true-i esri_sdeora-u sde-p sde ArcSDE 10.0 for
oracle11g Buil D 1343 Thu Feb 11:45:42 SDE
Server Configuration Tool Administration Utility
------------------ -----------------------------------
Alter server_config Table. Are you sure? (y/n): Y
successfully altered Server_config Table.
Modifying the tcpkeepalive parameter (the default setting is False) and modifying to True allows the system to automatically clear invalid connections. For Windows operating systems, the default is 2-hour cleanup. How to modify the purge time
The above mentioned in the Windows operating system, the default 2 hours, then whether this time can be modified to the user arbitrarily want time, such as 5 minutes, of course. Then we need to add a KeepAliveTime value to the operating system registry to determine this time value.
Local_machine\system\currentcontrolset\services\tcpip\parameters
Add DWORD entry: KeepAliveTime (in milliseconds)
Then restart the operating system.
Sun Solaris
The NDD command-set option is used by Sun Solaris to set Tcp_keepalive_interval configuration.
# Ndd-set/dev/tcptcp_keepalive_interval 300000
The same time as this refers to milliseconds. IBM AIX
Use the No command on IBM AIX to set the communication parameter S.
No-o tcp_keepidle=591
This time refers to a unit of half a second. HP-UX
Used in HP-UX
NDD-SET/DEV/TCPTCP_TIME_WAIT_INTERVA.L 300000
The same time as this refers to milliseconds. RedHat Linux
In Redhat Linux modify several parts of the following file/etc/sysctl.conf files, and restart the network daemon (/etc/rc.d/init.d/networkrestart).
# Decrease the time default value for Tcp_keepalive_time
tcp_keepalive_time = 1800
Other Notes
Question 1: Whether the direct connection also occupies the number of connections.
Answer: Yes.
Issue 2: Set whether to clear the invalid connection also clears the direct connect.
Answer: Do not clear.
ArcSDE9.2 SP5 solved a bug, everybody noticed:
Nim010667-setting the ArcSDE server configuration tcpkeepalive parameter to True does not terminate orphaned gsrvr proce SSEs as it should.
Document Download Address: http://download.csdn.net/source/3487666
-------------------------------------------------------------------------------------------------------
Copyright, the article is allowed to reprint, but must be linked to the source address, otherwise held legal responsibility!
QQ Group: 78773981
blog:http://blog.csdn.net/linghe301
weibo:http://www.weibo.com/linghe301
-------------------------------------------------------------------------------------------------------
by Lish