GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing university.voltdb.com — 5.2. Setting the Database to Read-Only Mode When System Resources Run Low Administrator's Guide5.2. Setting the Database to Read-Only Mode When System Resources Run LowVoltDB, like all software, uses system resources to perform its tasks. First and foremost, as an in-memory database, VoltDB relies on having sufficient memory available for storing the data and processing queries. However, it also makes use of disk resources for snapshots and caching data for other features, such as export and database replication. If system resources run low, one or more nodes may fail impacting availability, or worse, causing a service interruption. The best solution for this situation is to plan ahead and provision sufficient resources for your needs. The goal of the VoltDB Planning Guide is to help you do this. However, even with the best planning, unexpected conditions can result in resource shortages or overuse. In these situations, you want the database to protect itself against all-out failure. You can do this by setting resource limits in the configuration. System resource limits are set within the
deployment:
systemsettings:
resourcemonitor:
frequency: 30
memorylimit:
size: "70%"
alert: "60%"
disklimit:
snapshots:
size: "75%"
alert: "60%"
droverflow:
size: "60%"The deployment file lets you set limits on two types of system resources: For each resource type you can set the maximum size and, optionally, the level at which an alert is sent if SNMP is
enabled. In all cases, the allowable amount of the resource to be used can be specified as either a value representing a
number of gigabytes or a percentage of the total available. If the limit set by the The resource limits are checked every 60 seconds by default. However, you can adjust how frequently they are checked
— to accommodate the relative stability or volatility of your resource usage — using the
Of course, the ideal is to catch excessive resource use before the database is forced into
read-only mode. Use of SNMP and system monitors such as Nagios and New Relic to generate alerts at limits lower than the
VoltDB resource monitor are strongly recommended. And you can integrate other VoltDB monitoring with these monitoring
utilities as described in Section 5.3, “Integrating VoltDB with Prometheus”. But the resource monitor The following sections describe how to set limits for the individual resource types. 5.2.1. Monitoring Memory UsageYou specify a memory limit in the configuration using the In addition to pausing the database, you can specify that it runs a full compaction of table data to recover
whatever unused space is available due to fragmentation. This is the equivalent of running the voltadmin defrag
--full command manually. By setting the For example, the following setting will cause the VoltDB database to go into read-only mode and perform a full compaction if the RSS size exceeds 10 gigabytes on any of the cluster nodes. deployment:
systemsettings:
resourcemonitor:
memorylimit:
size: 10
compact: trueWhereas the following example sets the limit at 70% of total available memory but does not automatically compact memory used for table data. deployment:
systemsettings:
resourcemonitor:
memorylimit:
size: "70%"You can also set a trigger value for SNMP alerts — assuming SNMP is enabled — using the
deployment:
systemsettings:
resourcemonitor:
memorylimit:
size: "70%"
alert: "60%"If you do not specify a limit in the configuration file, VoltDB automatically sets a maximum size limit of 80% and an SNMP alert level of 70% by default. 5.2.2. Monitoring Disk UsageYou specify disk usage limits in the configuration using the deployment:
systemsettings:
resourcemonitor:
disklimit:
snapshots:
size: 200
commandlog:
size: "70%"You can also set a trigger value for SNMP alerts — assuming SNMP is enabled — using the
deployment:
systemsettings:
resourcemonitor:
disklimit:
snapshots:
size: 200
alert: 150
commandlog:
size: "70%"
alert: "60%"Note that you specify the device based on the feature that uses it. However, the limits applies to all data on that device, not just the space used by that feature. If you specify limits for two features that use the same device, the lower of the two limits will be applied. So, in the previous example, if snapshots and command logs both use a device with 250 gigabytes of total space, the database will be set to read-only mode if the total amount of used space exceeds the command logs limit of 70%, or 175 gigabytes. It is also important to note that there are no default resource limits or alerts for disks. If you do not explicitly specify a disk limit, there is no protection against running out of disk space. Similarly, unless you explicitly set an SNMP alert level, no alerts will be sent for the associated device. You can identify disk limits and alerts for any of the following Volt features, using the specified keywords as the subproperty name:
|
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |