Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #162

Merged
merged 2 commits into from
Feb 2, 2025
Merged

fixes #162

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion en/data-retention/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Data retention
~~~~~~~~~~~~~~

Data retention should be configured for heavy loaded production systems. Yeti has built-in tools to remove historical data from databases. Such tools can be configured via **/opt/yeti-web/config/yeti_web.yml** configuration file::
Data retention should be configured for production systems. Yeti has built-in tools to remove historical data from databases. Such tools can be configured via **/opt/yeti-web/config/yeti_web.yml** configuration file::


partition_remove_delay:
Expand All @@ -17,5 +17,11 @@ Data retention should be configured for heavy loaded production systems. Yeti ha

This configuration defines how many historical **partitions** should be saved in database for each table.

To apply configuration - restart **yeti-scheduler** service:

.. code-block:: console

# systemctl restart yeti-scheduler


Admin WEB interface views :ref:`CDR -> CDR Partitions <cdr_partitions>` and :ref:`Logs -> Log partitions <log_partitions>` allows to see existing partitions in CDRs and Routing databases.
36 changes: 32 additions & 4 deletions en/database-tuning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@

.. _database_tuning:

============================
Databases performance tuning
============================
=====================
Databases Maintenance
=====================

Yeti switch using two postgresql databases to store routing data and CDRs. This document describes some maintenance procedures.


Performance tuning
==================

By default PostgreSQL RDBMS configured to consume minimal system resources. This approach allows PostgreSQL to start on any server after installation. YETI as well as any other system uses PostgreSQL requires changing default configuration in order to archive best performance.

Expand All @@ -30,8 +36,30 @@ When configuration changed you should restart your PostgreSQL instance using `se



Dump and Restore
================


.. TODO: Explain why we need it

See https://github.com/markokr/skytools/blob/master/doc/faq.txt#L50 for details

To get know your cluster epoch, connect to database using **psql** and run:

.. code-block:: psql

cdr=# SELECT (txid_current() >> 32) as epoch;
epoch
-------
0
(1 row)


To change PostgreSQL cluster epoch - shutdown cluster and use **pg_resetwal** tool:

.. code-block:: console

# su - postgres
$ /usr/lib/postgresql/16/bin/pg_resetwal -e 1 /var/lib/postgresql/16/cdr


Where **1** is new epoch - it should be greater then epoch of old instance
2 changes: 1 addition & 1 deletion en/installation/installation-1.13/sems.rst
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ Launch configured traffic switch instance:

.. code-block:: console

# systemctl sems start
# systemctl start sems

In case of errors it's useful to use **sems -E -D3** command
which will launch daemon in foreground with debug logging level
Expand Down
Loading