转至繁体中文版     | 网站首页 | 图文教程 | 资源下载 | 站长博客 | 图片素材 | 武汉seo | 武汉网站优化 | 
最新公告:     敏韬网|教学资源学习资料永久免费分享站!  [mintao  2008年9月2日]        
您现在的位置: 学习笔记 >> 图文教程 >> 数据库 >> SyBase >> 正文
Optimizing SQL Anywhere performance over a WAN         ★★★★

Optimizing SQL Anywhere performance over a WAN

作者:闵涛 文章来源:闵涛的学习笔记 点击数:811 更新时间:2009/4/22 23:09:14

Document:

  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 settin
g 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.


[Access]sql随机抽取记录  [Access]ASP&SQL让select查询结果随机排序的实现方法
[系统软件]SQL语句性能优化--LECCO SQL Expert  [C语言系列]SQL Server到DB2连接服务器的实现
[C语言系列]SQL Server到SYBASE连接服务器的实现  [C语言系列]SQL Server到SQLBASE连接服务器的实现
[C语言系列]SQL Server连接VFP数据库的实现  [C语言系列]ASP+SQL Server之图象数据处理
[C语言系列]SQL Server连接ACCESS数据库的实现  [C语言系列]DBA的最佳选择—图形界面还是T-SQL命令?
教程录入:mintao    责任编辑:mintao 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    同类栏目
    · Sql Server  · MySql
    · Access  · ORACLE
    · SyBase  · 其他
    更多内容
    热门推荐 更多内容
  • 没有教程
  • 赞助链接
    更多内容
    闵涛博文 更多关于武汉SEO的内容
    500 - 内部服务器错误。

    500 - 内部服务器错误。

    您查找的资源存在问题,因而无法显示。

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved.
    闵涛 投放广告、内容合作请Q我! E_mail:admin@mintao.net(欢迎提供学习资源)

    站长:MinTao ICP备案号:鄂ICP备11006601号-18

    闵涛站盟:医药大全-武穴网A打造BCD……
    咸宁网络警察报警平台