Tango Database : History & Performance Jean-Luc pons

Download 480 b.
Hajmi480 b.

Tango Database : History & Performance

  • Jean-Luc PONS

  • European Synchrotron Radiation Facility (ESRF)

Tango Database History

  • Goal - To maintain a history of device configuration modifications. - To have the possibility to restore easily a property with Jive. - To display a device setpoint history.

  • Why ? - To make the restoration easier than today. - To avoid losing modifications done between 2 backups. ( Today we have only a backup done every 24H )

Tango Database History

  • The new DB scheme - 6 tables have been added to the tango MySQL database :

  • history_ids : Table which hold history identifiers property_device_hist : Device properties property_class_hist : Class properties property_hist : Free properties property_attribute_class_hist : Class attribute properties property_attribute_device_hist : Device attribute properties - The new scheme will stay compatible with old version of the DBServer.

Tango Database History

  • Upgrading from an old DB scheme - A tool called db_init_history is now available with the DBserver : Creates the 6 new tables.

  • Fills the history tables with the current database values.

  • ( Initialize the first value of the property history ) Does not affect the old tables.

  • - The db_init_history interface :

  • db_init_history [mysql_user] [mysql_password] ( Default user : root , Default password : no password )

Tango Database History

  • History tables - A history table is a copy of the corresponding property table with a date field

  • - A put_property() command will write in 2 tables (ex: property_device and property_device_hist) Allows to keep the backward compatibility with old versions of the DB Server

  • Does not affect performance of get_property() commands

  • - The cleanup of history tables is now done within the DB Server

  • (The DatabasePurge server is no longer needed and will be removed from CVS)

  • - The depth of history tables is defined by a DB Server device property called historyDepth (Default is 10)

Tango Database History

  • The query window (since Jive 3.1)

Tango Database Performance

  • The critical DbImportDevice - The DbImportDevice is used to get a network address (IOR) from a device name. - The performance problem occurs when we shutdown device servers as all remaining clients need to call DbImportDevice at each reconnection attempt.

Tango Database Performance

  • DbImportDevice statistics - Statistics have been made on a Sun-Fire-V240 running Solaris 9 - ~15 calls/sec when all servers are running. CPU: mysqld 1% , DBServer 0.6% - ~300 calls/sec when all servers are stopped. CPU: mysqld 11.8% , DBServer 58% Solutions - Increase the reconnection latency (Current Java and C++ API wait at least 1 second between 2 reconnections) - Use MySQL 5 stored procedure to avoid the SQL query compilation time.

  • - Distribute the naming service.

Tango Database Performance

  • A proposal for a distributed naming service

  • - Allows fast reconnection - Avoids the large number of DbImportDevice calls on the database. - The major difficulty will be to manage the backward compatibility with old server that won’t be exported in the name server.

Tango Database Performance

  • Connection number ( Unix system ) - When all servers are starting at the same time, they create a connection with the DB server (to get their configuration) - This implies a large number of opened file descriptor for the DB server - To manage this, the ORB may close some connection if the DB server reaches the maximum number of opened file. - When a lot of connections are required, this connection pool manager may consume much CPU.

  • Solution - Increase the maximum number of opened file ( A command line option has been added to the DBServer ) Database name -ORBendPoint giop:tcp:host:port –maxFile 2048 (Default 1024) - Slow down the server startup (Configurable by Starter & Astor) - Distribute the whole database

Tango Database History / Performance / Jive

  • What still needs to be done ?

  • Jive - Write a Jive panel to restore a full device/server configuration at a specified date. - Add search capabilities. - Add a property edition panel for device attribute property.

  • DbServer - Switch to MySQL 5 and use stored procedures.

  • - Implement a distributed name service.

Do'stlaringiz bilan baham:

Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2017
ma'muriyatiga murojaat qiling