Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-15551

Missing tuning for external PostgreSQL

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • None
    • 6.10.0
    • Documentation
    • None
    • None
    • None
    • None

      Document URL:
      https://access.redhat.com/documentation/en-us/red_hat_satellite/6.10-beta/html-single/installing_satellite_server_from_a_connected_network/index#postgresql-as-an-external-database-considerations_satellite

      Section Number and Name:
      4.13.3. Installing PostgreSQL

      Describe the issue:
      Missing the tuning for PostgreSQL which causes the external PG to become unusable.

      [root@ktordeur-external-postgres ~]# su - postgres
      Last login: Tue Oct 5 16:11:40 CEST 2021 on pts/0
      -bash-4.2$ psql
      psql (12.7)
      Type "help" for help.

      postgres=# SELECT sum(numbackends) FROM pg_stat_database;
      sum


      122
      (1 row)

      The number of connections needed for even a small Satellite instance is > 100 which will cause the following error without tuning:
      ~~~
      FATAL: remaining connection slots are reserved for
      non-replication superuser connections
      ~~~

      Suggestions for improvement:
      Include some of the PG tuning as mentioned in '5.5 PostgreSQL Tuning' from https://access.redhat.com/sites/default/files/attachments/performance_tuning_for_red_hat_satellite_6.91.pdf

      Additional information:

      Some information about the default set:

      1. diff /var/opt/rh/rh-postgresql12/lib/pgsql/data/postgresql.conf /var/opt/rh/rh-postgresql12/lib/pgsql/data/postgresql.conf.orig
        64c64
        < max_connections = 1000 # (change requires restart)

        > max_connections = 100 # (change requires restart)
        121c121
        < shared_buffers = 2GB # min 128kB

        > shared_buffers = 128MB # min 128kB
        130c130
        < work_mem = 8MB # min 64kB

        > #work_mem = 4MB # min 64kB
        599c599
        < autovacuum_vacuum_cost_limit = 2000 # default vacuum cost limit for

        > #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
        751d750
        < #

      More details about the connections can be found in http://pastebin.test.redhat.com/1007541

              levi_valeeva Levi Valeeva (Inactive)
              rhn-support-ktordeur Kenny Tordeurs
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: