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

Please read the whole email before replying:



I love the feedback I have received but I feel that somehow I did not
communicate the intent of this mini project very well. So let me
outline a few basics and who the audience was intended for.





Mini project title:

Initial Configuration Tool for PostgreSQL for Dummies



1) This is intended for newbie's. Not for experienced users or advanced
DBAs.



2) This tool is NOT intended to monitor your PostgreSQL efficiency.



3) I suggested JavaScript because most people that get started with
PostgreSQL will go to the web in order to find out about issues relating
to configuration. I wanted a very simple way for people to access the
tool that would not be tied to any particular environment or OS. If
there is someone that is using a text browser to view the web then they
are probably geeky enough not to want to bother with using this tool.



4) The intent is just to give people that have no clue a better starting
point than some very generic defaults.



Please think simple. I stress the word simple. The real challenge here
is getting the formulas correct. Someone mentioned to not focus on the
values but just get something out there for everyone to help tweak. I
agree!



What questions do you think should be asked in order to figure out what
values should go into the formulas for the configuration suggestions?



My thoughts:



What version of PostgreSQL are you using?

How much memory will be available to PostgreSQL?

How many connections will be made to PostgreSQL?





Thanks,







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
Richard Huxton
 
Posts: n/a
Default Re: PostgreSQL Configuration Tool for Dummies

Campbell, Lance wrote:
> Please think simple. I stress the word simple. The real challenge here
> is getting the formulas correct. Someone mentioned to not focus on the
> values but just get something out there for everyone to help tweak. I
> agree!
>
> What questions do you think should be asked in order to figure out what
> values should go into the formulas for the configuration suggestions?
>
> My thoughts:
>
> What version of PostgreSQL are you using?


OK, obviously not needed if embedded in the manuals.

> How many connections will be made to PostgreSQL?

OK (but changed order)

> How much memory will be available to PostgreSQL?

Would structure it like:
- What is total memory of your machine?
- How much do you want to reserve for other apps (e.g. apache/java)?

Also:
- How many disks will PG be using?
- How much data do you think you'll store?
- Will your usage be: mostly reads|balance of read+write|mostly writes
- Are your searches: all very simple|few complex|lots of complex queries

Then, with the output provide a commentary stating reasons why for the
chosen values. e.g.
random_page_cost = 1.0
Because you have [effective_cache_size = 1GB] and [total db size =
0.5GB] the cost of fetching a page is the same no matter what order you
fetch them in.

--
Richard Huxton
Archonet Ltd

---------------------------(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
  #3 (permalink)  
Old 04-19-2008, 10:02 AM
Francisco Reyes
 
Posts: n/a
Default Re: PostgreSQL Configuration Tool for Dummies

Campbell, Lance writes:

> 3) I suggested JavaScript because most people that get started with
> PostgreSQL will go to the web in order to find out about issues relating


Why not c?
It could then go into contrib.
Anyways.. language is likely the least important issue..
As someone mentioned.. once the formulas are worked out it can be done in a
few languages.. as people desire..

> How much memory will be available to PostgreSQL?
> How many connections will be made to PostgreSQL?


Will this be a dedicated Postgresql server?
Will there be mostly reads or will there also be significant amount of
writes?

Are you on a RAID system or do you have several disks over which you would
like to run postgresql on?

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

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
Campbell, Lance
 
Posts: n/a
Default Re: PostgreSQL Configuration Tool for Dummies

Francisco and Richard,
Why ask about disk or raid? How would that impact any settings in
postgresql.conf?

I did forget the obvious question:

What OS are you using?

Thanks,

Lance Campbell
Project Manager/Software Architect
Web Services at Public Affairs
University of Illinois
217.333.0382
http://webservices.uiuc.edu


-----Original Message-----
From: Francisco Reyes [mailto:lists@stringsutils.com]
Sent: Tuesday, June 19, 2007 11:58 AM
To: Campbell, Lance
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] PostgreSQL Configuration Tool for Dummies

Campbell, Lance writes:

> 3) I suggested JavaScript because most people that get started with
> PostgreSQL will go to the web in order to find out about issues

relating

Why not c?
It could then go into contrib.
Anyways.. language is likely the least important issue..
As someone mentioned.. once the formulas are worked out it can be done
in a
few languages.. as people desire..

> How much memory will be available to PostgreSQL?
> How many connections will be made to PostgreSQL?


Will this be a dedicated Postgresql server?
Will there be mostly reads or will there also be significant amount of
writes?

Are you on a RAID system or do you have several disks over which you
would
like to run postgresql on?

---------------------------(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
  #5 (permalink)  
Old 04-19-2008, 10:02 AM
Richard Huxton
 
Posts: n/a
Default Re: PostgreSQL Configuration Tool for Dummies

Campbell, Lance wrote:
> Francisco and Richard,
> Why ask about disk or raid? How would that impact any settings in
> postgresql.conf?


Well, random_page_cost will depend on how fast your disk system can
locate a non-sequential page. If you have a 16-disk RAID-10 array that's
noticably less time than a single 5400rpm IDE in a laptop.

> I did forget the obvious question:
>
> What OS are you using?


Tricky to keep simple, isn't it :-)

--
Richard Huxton
Archonet Ltd

---------------------------(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:02 AM
PFC
 
Posts: n/a
Default Re: PostgreSQL Configuration Tool for Dummies



> What version of PostgreSQL are you using?


I think newbies should be pushed a bit to use the latest versions, maybe
with some advice on how to setup the apt sources (in debian/ubuntu) to get
them.

> How much memory will be available to PostgreSQL?
>
> How many connections will be made to PostgreSQL?


I also think Postgres newbies using PHP should be encouraged to use
something like ligttpd/fastcgi instead of Apache. The fastcgi model
permits use of very few database connections and working PHP processes
since lighttpd handles all the slow transfers to the client
asynchronously. You can do the same with two Apache instances, one serving
static pages and acting as a proxy for the second Apache serving dynamic
pages.
With this setup, even low-end server setups (For our personal sites, a
friend and I share a dedicated server with 256MB of RAM, which we rent for
20€ a month). This thing will never run 200 Apache processes, but we have
no problem with lighttpd/php-fcgi and postgres.

---------------------------(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
  #7 (permalink)  
Old 04-19-2008, 10:02 AM
Francisco Reyes
 
Posts: n/a
Default Re: PostgreSQL Configuration Tool for Dummies

Campbell, Lance writes:

> Francisco and Richard,
> Why ask about disk or raid? How would that impact any settings in
> postgresql.conf?


If the user has 2 disks and says that he will do a lot of updates he could
put pg_xlog in the second disk.


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

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

On 6/19/07, Francisco Reyes <lists@stringsutils.com> wrote:
>
> Campbell, Lance writes:
>
> > Francisco and Richard,
> > Why ask about disk or raid? How would that impact any settings in
> > postgresql.conf?

>
> If the user has 2 disks and says that he will do a lot of updates he could
> put pg_xlog in the second disk.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>


Let's not ask about disk or raid at this level of sanity tuning. It is
important for a newbie to take the right first step. When it comes to disks,
we start talking I/O, SATA, SCSI and the varying degrees of SATA and SCSI,
and controller cards. Then we throw in RAID and the different levels
therein. Add to that, we can talk about drivers controlling these drives and
which OS is faster, more stable, etc. As you can see, a newbie would get
drowned. So, please keep it simple. I know many people on this list are
Gurus. We know you are the best in this field, but we are not and are just
trying to improve what we have.

--
Yudhvir Singh Sidhu
408 375 3134 cell

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

Yudhvir,

I completely agree. I was just putting together a similar email.



Thanks,



Lance Campbell

Project Manager/Software Architect

Web Services at Public Affairs

University of Illinois

217.333.0382

http://webservices.uiuc.edu



________________________________

From: pgsql-performance-owner@postgresql.org
[mailtogsql-performance-owner@postgresql.org] On Behalf Of Y Sidhu
Sent: Tuesday, June 19, 2007 12:49 PM
To: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] PostgreSQL Configuration Tool for Dummies





On 6/19/07, Francisco Reyes <lists@stringsutils.com> wrote:

Campbell, Lance writes:

> Francisco and Richard,
> Why ask about disk or raid? How would that impact any settings in
> postgresql.conf?


If the user has 2 disks and says that he will do a lot of updates he
could
put pg_xlog in the second disk.


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


Let's not ask about disk or raid at this level of sanity tuning. It is
important for a newbie to take the right first step. When it comes to
disks, we start talking I/O, SATA, SCSI and the varying degrees of SATA
and SCSI, and controller cards. Then we throw in RAID and the different
levels therein. Add to that, we can talk about drivers controlling these
drives and which OS is faster, more stable, etc. As you can see, a
newbie would get drowned. So, please keep it simple. I know many people
on this list are Gurus. We know you are the best in this field, but we
are not and are just trying to improve what we have.

--
Yudhvir Singh Sidhu
408 375 3134 cell


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

On Tue, 19 Jun 2007 12:58:26 -0400
Francisco Reyes <lists@stringsutils.com> wrote:
> Campbell, Lance writes:
> > 3) I suggested JavaScript because most people that get started with
> > PostgreSQL will go to the web in order to find out about issues relating

>
> Why not c?


Why not whatever and install it on www.PostgreSQL.org? Is there any
reason that this tool would need to be run on every installation. Run
it on the site and it can always be up to date and can be written in
whatever language is easiest to maintain on the mother system.

I would also like to make a pitch for a JavaScript-free tool. Just
collect all the pertinent information, work it out and display the
results in a second page. Some people just don't like JavaScript and
turn it off even if we can run it in our browser.

--
D'Arcy J.M. Cain <darcy@druid.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

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 04:45 AM.


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

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 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593