栏目搜索
 
 
 
 
你的位置:首页 > Sybase > Optimizing SQL Anywhere performance over a WAN >
 

Optimizing SQL Anywhere performance over a WAN

发布者:[本站编辑] | 来源:[]

Optimizing SQL Anywhere performance over a WAN_电脑维修资料库

summary:this document contains information on the various methods to optimize performance over a wandocument id:44606last revised:12/10/99topic:app developmentdocument type:tipproduct:sql anywhereversion:5platform:pcoperating system:os/2, windows 3.1, windows 95, windows ntdocument:  you can do the following things to optimize performance over a wan.
  ipx/spx protocols have some significant performance limitations in a routed (wide-area) network, which is why novell has been modifying them with "packet burst" and "spx ii" changes. tcp/ip is the protocol of choice for wan implementations and is the main focus of this document.   set your timer values to an appropriately high level. remember that the client and the server exchange packets to test for liveness and to determine if the query is complete yet. the switches to consider are:
-tr for active request termination timeouts. the server will only wait so long for a request to be retransmitted from the client before it will timeout the request and the connection. increase this value if this problem is occurring in your setup. this switch is no longer necessary in adaptive server anywhere 6.0-ts for default client retry timeouts. this tells the client how long to wait for a response from the server before it resends the request. increasing this value will cause fewer resends from the client which should reduce the amount of information passing between the client and server. if you increase this, you should also consider increasing the server request timeout period (see the -tr switch for the server). this switch is no longer necessary in adaptive server anywhere 6.0-tl for liveness checking. increasing this value will not improve performance but you should increase this value if your connection keeps timing out due to liveness. the switch can be set at the client or the server. any setting on the client will override the server setting for that particular client.
  set the packet size on the client and server (-p) to the largest value that makes sense for the wan/protocol combination (only your network administrator knows for sure). the objective is to allow fetches to return as many rows as practical in a packet. we will only use as much of a packet as makes sense. note that setting this value too large can cause multiple ip packets to be created.   consider using the -r parameter to disable multi-row fetching if you are only working with the first few rows in your result sets. this switch can be set by the server or by each individual client. it will cause the client to fetch only one row at a time instead of several.
  consider using the -b switch to limit the number of packets used in a multirecord fetch if you are retrieving a large number of rows.
  consider using the -s switch to increase the amount of buffer space used for network buffers.
  consider using the -x tcpip{receivebuffersize=nnnnn} parameter. this option preallocates memory in the protocol stack for receiving tcp/ip packets destined for the sql anywhere client or server. preallocation of memory inside the protocol stack may increase client/server performance for network-intensive applications.
  consider using the -x tcpip{sendbuffersize=nnnnnn} parameter. this option preallocates memory in the protocol stack for sending tcp/ip packets. under supported platforms, sending of packets is done asynchronously and preallocation of a memory block may allow the protocol stack and client/server to operate concurrently for a longer period of time, thus achieving better performance for network-intensive applications.
  consider using the host=x.y.z.w, timeout=x and dobroadcast=no tcpip parameters to increase connection speed.
  consider using stored procedures for large database queries. this eliminates the need to send a large statement to the server across the network by allowing you to send a small call statement to execut the query.
  consider combining several column values into one value (eg. using the string() function) in the select statement if your result set has a large number of columns.
  when working with 3rd party development tools (eg. powerbuilder, visual basic, delphi), check to see if there are any application specific settings you can make to increase your performance. eg. in powerbuilder, setting the block connection property to 1 and setting the staticbind connection property to 1 has led to an increase in application performance over a wan for many customers.
  here are some suggested command line switch settings from which you can start tuning. start with these and adjust them in your test environment to see how they affect performance. add/remove switches mentioned above and see how they affect performance. it is not an exact science and will require some trial and error to get the best performance in your particular network environment with your particular application. if your application is also going to be running in a lan environment, don't forget to test your settings there as well, as there may be a need to adjust the communications options for that environment.
 sql anywhere server command line switches     dbsrv50 -x tcpip -p 1490  -tl 2000  -tr 2000          sql anywhere client command line switches     dbclient -b 32  -s 1000  -p 1490  -ts 300,3000  -tl 2000       -x tcpip{host=xxx.xxx.xxx.xxx;timeout=20;dobroadcast=no;receivebuffersize=100000;sendbuffersize=100000}
  note: the options listed here are communication oriented. there are other options to consider that will make the server more efficient in all environments (eg. cache size and database page size). see the documentation for details.
  you can do the following things to optimize performance over a wan:
  ipx/spx protocols have some significant performance limitations in a routed (wide-area) network, which is why novell has been modifying them with "packet burst" and "spx ii" changes. tcp/ip is the protocol of choice for wan implementations.   set your timer values to an appropriately high level. remember that the client and the server exchange packets to test for liveliness and to determine if the query is complete yet. (these are the packets your customer is seeing). the switches to consider are -tl and -tr.
  set the packet size on the client and server (-p) to the largest value that makes sense for the wan/protocol combination (only your network administrator knows for sure) the objective is to allow fetches to return as many rows as practical in a packet. we will only use as much of a packet as makes sense.
  consider using the -x tcpip{receivebuffersize=nnnnn} parameter
  consider using the -x tcpip{sendbuffersize=nnnnnn} parameterall in all this is a trial-and-error exercise to determine the correct combination for the application/network environment.
</t

 
返回列表 返回Sybase
 
  推荐文章
 
     暂无
 
 
  随机资讯
 
     暂无