6.3. 手动设置 Entry Cache Size
				条目缓存用于存储搜索和读取操作中使用的目录条目。将条目缓存设置为可让 Directory 服务器存储所有记录的最高性能影响。
			
				如果没有配置条目缓存,Directory 服务器会从 
id2entry.db 数据库文件读取条目,并将 DN 从磁盘格式转换为内存格式。存储在缓存中的条目可让服务器跳过磁盘 I/O 和转换步骤。
			注意
					红帽建议自动根据硬件资源优化设置,而不是手动设置条目缓存大小。详情请查看 第 6.1.1 节 “手动重新启用数据库和条目缓存自动大小”。
				
6.3.1. 使用命令行手动设置条目缓存大小
复制链接链接已复制到粘贴板!
					使用命令行手动设置条目缓存大小:
				
- 禁用自动缓存调整:dsconf -D "cn=Directory Manager" ldap://server.example.com backend config set --cache-autosize=0 # dsconf -D "cn=Directory Manager" ldap://server.example.com backend config set --cache-autosize=0Copy to Clipboard Copied! Toggle word wrap Toggle overflow 
- 显示后缀及其对应的后端:dsconf -D "cn=Directory Manager" ldap://server.example.com suffix list # dsconf -D "cn=Directory Manager" ldap://server.example.com suffix list dc=example,dc=com (userroot)Copy to Clipboard Copied! Toggle word wrap Toggle overflow 这个命令显示每个后缀旁的后端数据库名称。下一步需要后缀的数据库名称。
- 为数据库设置条目缓存大小:dsconf -D "cn=Directory Manager" ldap://server.example.com backend suffix set --cache-memsize=2147483648 userRoot # dsconf -D "cn=Directory Manager" ldap://server.example.com backend suffix set --cache-memsize=2147483648 userRootCopy to Clipboard Copied! Toggle word wrap Toggle overflow 此命令将条目缓存设置为 2GB。
- 重启 Directory Service 实例:dsctl instance_name restart # dsctl instance_name restartCopy to Clipboard Copied! Toggle word wrap Toggle overflow 
6.3.2. 使用 Web 控制台手动设置 Entry Cache Size
复制链接链接已复制到粘贴板!
					使用 Web 控制台手动设置条目缓存大小:
				
- 在 web 控制台中打开 Directory Server 用户界面。详情请参阅 Red Hat Directory Server Administration Guide 中的使用 Web 控制台登录到 目录服务器一节。
- 选择 实例。
- 在 选项卡上,选择 Global Database Configuration。
- 禁用自动 缓存调优。
- 单击 。
- 单击 按钮,然后选择 Restart Instance。
- 在 Entry Cache Size (bytes) 字段中设置数据库缓存的大小。
- 单击 。
- 单击 按钮,然后选择 Restart Instance。