n0derunner

    Benchmarking with Postgres PT1

    Published: (Updated: ) in Postgres, , , by .

    Image By Daniel Lundin

    In this example, we use Postgres and the pgbench workload generator to drive some load in a virtual machine.  Assume a Linux virtual machine that has Postgres installed. Specifically using a Bitnami virtual appliance.

    $ sudo ufw allow 5432
    psql -U postgres
    psql -U postgres
    postgres=# alter user postgres with password 'NEW_PASSWORD';
    postgresl=# \q
    $ sudo -u postgres createdb pgbench-sf10
    $ sudo -u postgres pgbench -i -s 10 pgbench-sf10
    $ sudo -u postgres pgbench pgbench-sf10
    

    The workload pattern, and load on the system will vary greatly depending on the scale factor.  

    Scale-Factor        Working Set Size


    1                                   23M
    10                                157M
    100                             1.7GB
    1000                          15GB
    2500                          37GB
    5000                         74GB
    10000                       147GB