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

Provide more detailed explanation of database types #2

Open
imidata opened this issue Feb 25, 2013 · 3 comments
Open

Provide more detailed explanation of database types #2

imidata opened this issue Feb 25, 2013 · 3 comments

Comments

@imidata
Copy link

imidata commented Feb 25, 2013

In pg_tune there is an option to set the database type:
-T or --type : Specifies database type. Valid options are: DW, OLTP, Web, Mixed, Desktop

It would be helpful to provide more detailed explanation of the database types and what a user should consider when choosing one option over the others.

Thank you for all your hard work on pg_tune.

@ssbarnea
Copy link

I installed pgtune on debian and it's version 1.0, the dev repository reports 0.9 something and wasn't upgraded in 5 years. Later I found your fork but I don't know if your changes reached the Debian version or if its safe to use it with postgres 9.1.

And, yes I would like to know more about what are these setups about. In my case it's a dedicated postgres server but I do not see this as an option.

@nikkelj
Copy link

nikkelj commented Apr 21, 2015

My guess, based on what I see in the differences these "operation modes" put out:
DW = DataWarehouse => Your box is doing mostly warehouse-like db work. Results in giving biggest maintenance_work_mem, checkpoint_segments, default_statistics_target. Average work_mem.
OLTP = Online Transaction Processing => Your box is getting hit hard with lots of little small-data transactions. Bigger work_mem, smaller maintenance_work_mem, average check_point_segments.
Web = Generic Web Server => Balanced, similar to OLTP, but fewer checkpoint_segments.
Mixed = Mixed usages => work_mem like DW, checkpoint_segments like Web, maintenance_work_mem like OLTP, Web.
Desktop = Standalone usage => minimize footprint. Small default_statistics_target, maintenance_work_mem like OLTP, web, Mixed, default checkpoint_completion_target (undefined), smaller effective cache size, smaller work_mem, fewer checkpoint_segments, smaller shared_buffers.

In all cases, it seems to recommend wal_buffers = max, and roughly follows the shared_buffers 75% of shmax recommendation I've seen elsewhere.

@openfirmware
Copy link

I was also looking for a good explanation for the terms and found a good overview in the pgtune documentation included with chef-postgresql, provided by @davidc-donorschoose:

# dw -- Data Warehouse
#   * Typically I/O- or RAM-bound
#   * Large bulk loads of data
#   * Large complex reporting queries
#   * Also called "Decision Support" or "Business Intelligence"
#
# oltp -- Online Transaction Processing
#   * Typically CPU- or I/O-bound
#   * DB slightly larger than RAM to 1TB
#   * 20-40% small data write queries
#   * Some long transactions and complex read queries
#
# web -- Web Application
#   * Typically CPU-bound
#   * DB much smaller than RAM
#   * 90% or more simple queries
#
# mixed -- Mixed DW and OLTP characteristics
#   * A wide mixture of queries
#
# desktop -- Not a dedicated database
#   * A general workstation, perhaps for a developer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants