Le variabili server di sistema

Stai visualizzando una vecchia versione di questo article. Visualizza la versione più recente.

Sulle variabili server di sistema

MariaDB è dotata di molte variabili di sistema che è possibile modificare per adattarla ai propri bisogni. La maggior parte di esse possono essere modificate tramite le opzioni da riga di comando.

Ecco i modi per ottenere un elenco completo delle variabili di sistema:

  • Dal client mysql, si esegue:
SHOW VARIABLES;

Si veda SHOW VARIABLESper ulteriori informazioni su come usare questo comando.

  • Dalla shell, si esegue mysqld come segue:
  mysqld --verbose --help

Setting Server System Variables

There are several ways to set server system variables:

  • Specify them on the command line:
shell> ./mysqld_safe --aria_group_commit="hard"
  • Specify them in your my.cnf file:
aria_group_commit = "hard"
  • Set them from the mysql client using the SET command:
SET GLOBAL aria_group_commit="hard";

List of Server System Variables

New variables in MariaDB are:

key_cache_segments

  • Description: The number of segments in a key cache.
  • Commandline: --key-cache-segments=#
  • Scope: Global
  • Dynamic: Yes
  • Type: number
  • Valid values: 0-64
  • Default value: 0 (non-segmented)
  • Introduced: MariaDB 5.2.0

aria_group_commit

  • Description: Specifies aria group commit mode.
  • Commandline: --aria_group_commit="value"
  • Alias: maria_group_commit
  • Scope: Global
  • Dynamic: No
  • Type: string
  • Valid values:
    • none - Group commit is disabled.
    • hard - Wait the number of microseconds specified by aria_group_commit_interval before actually doing the commit. If the interval is 0 then just check if any other threads have requested a commit during the time this commit was preparing (just before sync() file) and send their data to disk also before sync().
    • soft - The service thread will wait the specified time and then sync() to the log. If the interval is 0 then it won't wait for any commits (this is dangerous and should generally not be used in production)
  • Default value: none
  • Introduced: MariaDB 5.2

aria_group_commit_interval

  • Description: Interval between commits in microseconds (1/1000000c) for other threads to come and do a commit in "hard" mode and sync()/commit at all in "soft" mode. Option only has effect if aria_group_commit is used.
  • Commandline: --aria_group_commit_interval=#
  • Alias: maria_group_commit_interval
  • Scope: Global
  • Dynamic: No
  • Type: number
  • Valid values:
    • Default: 0 (no waiting)
    • 32-bit systems: 0-4294967295
    • 64-bit systems: 0-18446744073709547520
  • Introduced: MariaDB 5.2

plugin_maturity

  • Description: The lowest acceptable plugin maturity. MySQL will not load plugins less mature than that.
  • Commandline: --plugin-maturity=level
  • Scope: Global
  • Dynamic: No
  • Type: enum
  • Valid levels: unknown, experimental, alpha, beta, gamma, stable
  • Default value: unknown
  • Introduced: MariaDB 5.2.1

binlog_checksum

  • Description: Enable/Disable binlog checksums.
  • Commandline: --binlog_checksum=[0|1]
  • Scope: Global
  • Access Type: Can be changed dynamically
  • Data Type: bool
  • Default Value: OFF (0)
  • Introduced: MariaDB 5.3

master_verify_checksum

  • Description: Verify binlog checksums when reading events from the binlog on the master.
  • Commandline: --master_verify_checksum=[0|1]
  • Scope: Global
  • Access Type: Can be changed dynamically
  • Data Type: bool
  • Default Value: OFF (0)
  • Introduced: MariaDB 5.3

slave_sql_verify_checksum

  • Description: Verify binlog checksums when the slave SQL thread reads events from the relay log.
  • Commandline: --slave_sql_verify_checksum=[0|1]
  • Scope: Global
  • Access Type: Can be changed dynamically
  • Data Type: bool
  • Default Value: ON (1)
  • Introduced: MariaDB 5.3

Other Variables are the same as in MySQL. See Server System Variables in the MySQL Manual for the full list of MySQL server system variables.

Commenti

Sto caricando i commenti......
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.