>4.2.1优化配置Server & IIS4.2.1.1扩大IIS高速缓存服务器保留了一部分内存空间用作IIS高速缓存,为将来的请求存储对象,这样IIS就可从高速缓存中检索对象而不用从硬盘中检索。调整IIS高速缓存的容量需要修改注册表,表项如下: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters\MemoryCacheSize =0x 1E84800(类型为REG_DWORD,using hexadecimal notation.) 也可设为十进制,范围0-4GB,缺省值为3072000(3MB)。一般来说此值最小应设为服务器内存的10%。 IIS通过高速缓存系统句柄、目录列表以及其他常用数据的值来提高系统的性能。这个参数指明了分配给高速缓存的内存大小。如果该值为0,那就意味着“不进行任何高速缓存”。在这种情况下系统的性能可能会降低。如果你的服务器网络通讯繁忙,并且有足够的内存空间,可以考虑增大该值。必须注意的是修改注册表后,需要重新启动才能使新值生效。 4.2.1.2调整IIS占用CPU时间服务器的CPU处理器能力总是有限的。哪一个应用程序占用处理器的时间最长,谁的性能就能得到最大的提高。 (1)在NT的控制面板中,双击系统图标。 (2)单击性能标签。 (3)在应用程序性能下将游标拖到None的位置,这样就可以使所有正在运行的服务,包括IIS,使用处理器的时间达到最大值。 (4)选择最大化网络应用程序的总处理能力。然后单击“OK。” 4.2.1.3协议及相关优化(1)为了提高性能和节约资源,应该只运行需要的协议。 (2)应该将IIS服务器,设置为独立的服务器,不要让服务器去承受域控制器要求的额外负荷。 (3)可以把NT服务器的页交换文件分布到多个物理磁盘上,注意是多个“物理磁盘”,分布在多个分区上是无效的。另外,不要将页交换文件放在与Windows NT引导区相同的分区中。 (4)使用磁盘镜像或磁盘带区集可以提高磁盘的读取性能。 (5)关于日志的记录,应该采用文件记录而不是记录到ODBC数据源。此外,还可以在记录期间增加用来记录日志的内存缓冲区的容量来减少磁盘的活动。该缓冲区的缺省容量值为64KB。 (6)最好把所有的数据都储存在一个单独的分区里。然后定期运行磁盘碎片整理程序以保证在存储Web服务器数据的分区中没有碎片。使用NTFS有助于减少碎片。 (7)虽然SSL可以提供相当可靠的加密传输。但是所需的额外开销会导致IIS服务器速度下降,尤其是在处理大型文件的时候。所以应该只对确实需要保护的目录进行SSL加密。 4.2.1.4 调整失效时间HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters\ObjectCacheTTL=0x8CA0. 4.2.1.5 调整最大线程数HKEY_LOCAL_MACHINE\SYSTEM\ CurrentControlSet\Services\w3SVC\ASP\Parameters,增加ProcessorThreadMax,减小这个值,看看性能的变化;或者增大这个值。) 4.2.1.6 注册表中的其他可优化项以“HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters\”为父节点; CacheSecurityDescriptor Indicates whether security descriptors are cached for file objects. A value of 1 enables this feature. A value of 0 disables this feature. When enabled (the default setting), security descriptors for files are saved when caching a file object. As long as the file is cached, IIS will not need to re-access the file to determine access rights for new users. This value is most useful for sites that authenticate users and not useful for sites that allow anonymous access. CheckCertRevocation Indicates whether IIS checks to see if a client certificate is revoked. If you issue your own certificates and make local certificate checks, you might want to enable this feature. Otherwise, the feature should be disabled, which is the default. A value of 1 enables this feature. DisableMemoryCache Indicates whether IIS memory caching is enabled or disabled. By default, memory caching is enabled (meaning this value is set to 0). Disable memory caching only for testing or development purposes. ListenBackLog Specifies the maximum number of active connections that IIS maintains in the connection queue. The default value is 15 and the range of acceptable values is from 1 to 250. MaxCachedFileSize Determines the maximum size of a file that can be placed in the file cache. IIS will not cache files that are larger than this value. The default value is 262,144 bytes (256 KB). MaxConcurrency Specifies how many threads per processor should be allowed to run simultaneously if there is a pending input/output (I/O) operation. The default value (0) allows IIS to control the number of threads per processor. You can also set a specific value. MaxPoolThreads Sets the number of pool threads to create per processor. Each pool thread watches for a network request for a CGI application and processes it. This value does not control threads that are used by ISAPI applications. By default, the value is set to 4. On a single processor system, this means that only four CGI applications could run simultaneously. MemCacheSize Sets the maximum amount of memory that IIS will use for its file cache. If IIS does not need this much memory, it will be left for other applications to use. By default, IIS uses 50 percent of the available memory. The valid range is from 0 megabytes to the total amount of physical memory available in megabytes. ObjectCacheTTL Sets the length of time (in milliseconds) that objects are held in memory. If the object hasn''''t been used in this interval, it is removed from memory. The default value is 30 seconds (300,000 milliseconds). PoolThreadLimit Sets the maximum number of pool threads that can be created on the server. This limit is for all IIS threads. The default value is twice the size of physical memory in megabytes. 4.2.1.7禁用不必要的服务:禁用专用 Web 服务器不需要的 Windows 2000 服务。方法是:单击开始,依次指向程序、管理工具,然后单击计算机管理。在“计算机管理(本地)”下,展开“服务和应用程序”,然后单击服务。当前所运行服务的状态 列中显示已启动 。以下服务是专用 Web 服务器上不需要的: 警报器 剪贴簿 计算机浏览器 DHCP 客户端 DHCP 服务器 传真服务 文件复制 红外线监视器 Internet 连接共享 信使 NetMeeting 远程桌面共享 网络 DDE 网络 DDE DSDM NWLink NetBIOS NWLink 上一页 [1] [2] [3] [4] [5] [6] [7] 下一页 [C语言系列]NET 中C#的switch语句的语法 [系统软件]托拽Explore中的文件到VB.net的窗口 [系统软件]Boost库在XP+Visual C++.net中的安装 [常用软件]新配色面板:Paint.Net3.0RC1官方下载 [常用软件]用内建的“Net Meeting”聊天 [VB.NET程序]Henry的VB.NET之旅(三)—共享成员 [VB.NET程序]Henry的VB.NET之旅(二)—构造与析构 [VB.NET程序]Henry的VB.NET之旅(一)—失踪的窗体 [VB.NET程序]在托盘上显示Balloon Tooltip(VB.NET) [VB.NET程序]Henry手记-VB.NET中动态加载Treeview节点(二)
|