See www.zabbix.com for the official Zabbix site.

Docs/specs/ZBX-5498

From Zabbix.org
Jump to: navigation, search

Improve performance of host.create

ZBX-5498

Status: v1.0

Owner: Alexei Vladishev

Summary

Current implementation of host.create is very slow, it does not take advantage of bulk operations.

Specification

The API method host.create should be refactored to provide much better performance.

Details

General
  • All inserts/updated/deletes must always use bulk syntax
  • All records must be sorted by ID (primary key) for update and delete operations to avoid deadlocks
  • Minimum set of SQL statements must be used

Documentation

  • Update what's new in 2.2

Test cases

  • Minimum number of SQL statements is used
  • All SQL update/delete operations are sorted by ID
  • Bulk SQL syntax is used for mass operations
  • It takes less than 1 sec to create a new host linked to Linux template on a system with 100K of hosts already linked to the Linux template