Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Performance

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 10:02 AM
Campbell, Lance
 
Posts: n/a
Default PostgreSQL Configuration Tool for Dummies

Below is a link to the HTML JavaScript configuration page I am creating:



http://www.webservices.uiuc.edu/postgresql/



I had many suggestions. Based on the feedback I received, I put
together the initial list of questions. This list of questions can be
change.



Memory

There are many different ways to ask about memory. Rather than ask a
series of questions I went with a single question, #2. If it is better
to ask about the memory in a series of questions then please give me the
questions you would ask and why you would ask each of them. From my
understanding the primary memory issue as it relates to PostgreSQL is
"how much memory is available to PostgreSQL". Remember that this needs
to be as simple as possible.



My next step is to list the PostgreSQL parameters found in the
postgresql.conf file and how I will generate their values based on the
questions I have so far. I will primarily focus on PostgreSQL 8.2.x.
Once I have a consensus from everyone then I will put functionality
behind the "Generate Suggested Settings" button.



Thanks for all of the feedback,





Lance Campbell

Project Manager/Software Architect

Web Services at Public Affairs

University of Illinois

217.333.0382

http://webservices.uiuc.edu




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 10:02 AM
Y Sidhu
 
Posts: n/a
Default Re: PostgreSQL Configuration Tool for Dummies

On 6/19/07, Campbell, Lance <lance@uiuc.edu> wrote:
>
> Below is a link to the HTML JavaScript configuration page I am creating:
>
>
>
> http://www.webservices.uiuc.edu/postgresql/
>
>
>
> I had many suggestions. Based on the feedback I received, I put together
> the initial list of questions. This list of questions can be change.
>
>
>
> Memory
>
> There are many different ways to ask about memory. Rather than ask a
> series of questions I went with a single question, #2. If it is better to
> ask about the memory in a series of questions then please give me the
> questions you would ask and why you would ask each of them. From my
> understanding the primary memory issue as it relates to PostgreSQL is "how
> much memory is available to PostgreSQL". Remember that this needs to be as
> simple as possible.
>
>
>
> My next step is to list the PostgreSQL parameters found in the
> postgresql.conf file and how I will generate their values based on the
> questions I have so far. I will primarily focus on PostgreSQL 8.2.x.
> Once I have a consensus from everyone then I will put functionality behind
> the "Generate Suggested Settings" button.
>
>
>
> Thanks for all of the feedback,
>
>
>
>
>
> Lance Campbell
>
> Project Manager/Software Architect
>
> Web Services at Public Affairs
>
> University of Illinois
>
> 217.333.0382
>
> http://webservices.uiuc.edu
>
>
>

Lance,

Simply awesome!


--
Yudhvir Singh Sidhu
408 375 3134 cell

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-19-2008, 10:02 AM
Francisco Reyes
 
Posts: n/a
Default Re: PostgreSQL Configuration Tool for Dummies

Campbell, Lance writes:

For the "6) Are your searches:"
How about having "many simple"


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-19-2008, 10:02 AM
david@lang.hm
 
Posts: n/a
Default Re: PostgreSQL Configuration Tool for Dummies

On Tue, 19 Jun 2007, Campbell, Lance wrote:

> Memory
>
> There are many different ways to ask about memory. Rather than ask a
> series of questions I went with a single question, #2. If it is better
> to ask about the memory in a series of questions then please give me the
> questions you would ask and why you would ask each of them. From my
> understanding the primary memory issue as it relates to PostgreSQL is
> "how much memory is available to PostgreSQL". Remember that this needs
> to be as simple as possible.


there are three catagories of memory useage

1. needed by other software
2. available for postgres
3. needed by the OS

it's not clear if what you are asking is #2 or a combination of #2 and #3

IMHO you should ask for #2 and #3, possibly along the lines of "how much
memory is in the machine that isn't already used by other applications"

David Lang

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-19-2008, 10:02 AM
Josh Berkus
 
Posts: n/a
Default Re: PostgreSQL Configuration Tool for Dummies


> there are three catagories of memory useage
>
> 1. needed by other software
> 2. available for postgres
> 3. needed by the OS


There's actually only two required memory questions:

M1) How much RAM do you have on this machine?
M2) Is this:
() Dedicated PostgreSQL Server?
() Server shared with a few other applications?
() Desktop?

I don't think the "mostly reads / mostly writes" question covers anything,
nor is it likely to produce accurate answers. Instead, we need to ask the
users to characterize what type of application they are running:

T1) Please characterize the general type of workload you will be running on
this database. Choose one of the following four:
() WEB: any scripting-language application which mainly needs to support
90% or more data reads, and many rapid-fire small queries over a large
number of connections. Examples: forums, content management systems,
directories.
() OLTP: this application involves a large number of INSERTs, UPDATEs and
DELETEs because most users are modifying data instead of just reading it.
Examples: accounting, ERP, logging tools, messaging engines.
() Data Warehousing: also called "decision support" and "BI", these
database support a fairly small number of large, complicated reporting
queries, very large tables, and large batch data loads.
() Mixed/Other: if your application doesn't fit any of the above, our
script will try to pick "safe, middle-of-the-road" values.

Hmmm, drop question (6) too.

(2) should read: "What is the maximum number of database connections which
you'll need to support? If you don't know, we'll pick a default."

Other questions we need:

How many/how fast processors do you have? Pick the option which seems
closest to what you have:
() A single laptop processor
() Single or dual older processors (1ghz)
() Dual or quad current consumer processors (2ghz+)
() Large, recent multi-core server system

"What OS Are You Using", of course, needs to have Linux, Solaris, BSD, OSX
and Windows. At some point, this tool will also need to generate for the
user any shmem settings that they need to make on the OS.

--
--Josh

Josh Berkus
PostgreSQL @ Sun
San Francisco

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-19-2008, 10:03 AM
Charles Sprickman
 
Posts: n/a
Default Re: PostgreSQL Configuration Tool for Dummies

On Tue, 19 Jun 2007, Josh Berkus wrote:

> "What OS Are You Using", of course, needs to have Linux, Solaris, BSD, OSX
> and Windows. At some point, this tool will also need to generate for the
> user any shmem settings that they need to make on the OS.


I also noticed that on FreeBSD (6.2) at least the stock config simply
won't run without building a new kernel that bumps up all the SHM stuff or
dropping down resource usage in the postgres config...

Overall, I like the idea. I've been slowly working on weaning myself off
of mysql and I think removing any roadblocks that new users might stumble
upon seems like an excellent way to get more exposure.

Charles

> --
> --Josh
>
> Josh Berkus
> PostgreSQL @ Sun
> San Francisco
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
> http://www.postgresql.org/about/donate
>


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-19-2008, 10:03 AM
Greg Smith
 
Posts: n/a
Default Re: PostgreSQL Configuration Tool for Dummies

On Tue, 19 Jun 2007, Josh Berkus wrote:

> I don't think the "mostly reads / mostly writes" question covers anything,
> nor is it likely to produce accurate answers. Instead, we need to ask the
> users to characterize what type of application they are running:
> T1) Please characterize the general type of workload you will be running on
> this database. Choose one of the following four...


We've hashed through this area before, but for Lance's benefit I'll
reiterate my dissenting position on this subject. If you're building a
"tool for dummies", my opinion is that you shouldn't ask any of this
information. I think there's an enormous benefit to providing something
that takes basic sizing information and gives conservative guidelines
based on that--as you say, "safe, middle-of-the-road values"--that are
still way, way more useful than the default values. The risk in trying to
make a complicated tool that satisfies all the users Josh is aiming his
more sophisticated effort at is that you'll lose the newbies.

Scan the archives of this mailing list for a bit. If you look at what
people discover they've being nailed by, it's rarely because they need to
optimize something like random_page_cost. It's usually because they have
a brutally wrong value for one of the memory or vacuum parameters that are
very easy to provide reasonable suggestions for without needing a lot of
information about the server.

I wouldn't even bother asking how many CPUs somebody has for what Lance is
building. The kind of optimizations you'd do based on that are just too
complicated to expect a tool to get them right and still be accessible to
a novice.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-19-2008, 10:04 AM
Scott Marlowe
 
Posts: n/a
Default Re: PostgreSQL Configuration Tool for Dummies

Greg Smith wrote:
> On Tue, 19 Jun 2007, Josh Berkus wrote:
>
>> I don't think the "mostly reads / mostly writes" question covers
>> anything,
>> nor is it likely to produce accurate answers. Instead, we need to
>> ask the
>> users to characterize what type of application they are running:
>> T1) Please characterize the general type of workload you will be
>> running on
>> this database. Choose one of the following four...

>
> We've hashed through this area before, but for Lance's benefit I'll
> reiterate my dissenting position on this subject. If you're building
> a "tool for dummies", my opinion is that you shouldn't ask any of this
> information. I think there's an enormous benefit to providing
> something that takes basic sizing information and gives conservative
> guidelines based on that--as you say, "safe, middle-of-the-road
> values"--that are still way, way more useful than the default values.
> The risk in trying to make a complicated tool that satisfies all the
> users Josh is aiming his more sophisticated effort at is that you'll
> lose the newbies.

Generally I agree, however, how about a first switch, for beginner /
intermediate / advanced.

The choice you make determines how much detail we ask you about your
setup. Beginners get two or three simple questions, intermediate a
handful, and advanced gets grilled on everything. Then, just write the
beginner and maybe intermediate to begin with and ghost out the advanced
until it's ready.

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-19-2008, 10:05 AM
Greg Smith
 
Posts: n/a
Default Re: PostgreSQL Configuration Tool for Dummies

On Thu, 21 Jun 2007, Scott Marlowe wrote:

> Generally I agree, however, how about a first switch, for beginner /
> intermediate / advanced.


You're describing a perfectly reasonable approach for a second generation
tool in this area. I think it would be very helpful for the user
community to get a first generation one that works fairly well before
getting distracted at all by things like this. The people capable of
filling out the intermediate/advanced settings can probably just do a bit
of reading and figure out most of what they should be doing themselves.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 04-19-2008, 10:06 AM
Adam Tauno Williams
 
Posts: n/a
Default Re: PostgreSQL Configuration Tool for Dummies

On Fri, 2007-06-22 at 02:32 -0400, Greg Smith wrote:
> On Thu, 21 Jun 2007, Scott Marlowe wrote:
>
> > Generally I agree, however, how about a first switch, for beginner /
> > intermediate / advanced.

>
> You're describing a perfectly reasonable approach for a second generation
> tool in this area. I think it would be very helpful for the user
> community to get a first generation one that works fairly well before
> getting distracted at all by things like this. The people capable of
> filling out the intermediate/advanced settings can probably just do a bit
> of reading and figure out most of what they should be doing themselves.


Just as an aside; how come the installation/setup "Tutorial" section -
http://www.postgresql.org/docs/8.2/i...ial-start.html -
doesn't mention setting some rough reasonable defaults in
postgresql.conf or even a reference to the parameter documentation
section. It seems like such a reference should exist between -
http://www.postgresql.org/docs/8.2/i...rial-arch.html - and
- http://www.postgresql.org/docs/8.2/i...-accessdb.html

At least something along those lines should be said at
http://www.postgresql.org/docs/8.2/i...tall-post.html

Personally, as DBA for more than a decade, I've got 0 sympathy for
people who setup a database but can't be bothered to read the
documentation. But in the case of PostgreSQL the documentation could do
a better job of driving users to even the existence [and importance of]
postgresql.conf and routine maintenance techniques.
http://www.postgresql.org/docs/8.2/i...me-config.html
http://www.postgresql.org/docs/8.2/i...intenance.html

Seems to me that even a remake of something like -
http://www.iiug.org/~waiug/old/forum...ing/sld001.htm - focused
on PostgreSQL would be novel and very interesting.

Just my two cents.

PostgreSQL is awesome, BTW.




---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:05 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544