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:29 AM
Willo van der Merwe
 
Posts: n/a
Default Hardware spec

Hi guys,

I'm have the rare opportunity to spec the hardware for a new database
server. It's going to replace an older one, driving a social networking
web application. The current server (a quad opteron with 4Gb of RAM and
80Gb fast SCSI RAID10) is coping with an average load of ranging between
1.5 and 3.5.

The new machine spec I have so far:
2 x Intel Xeon 2.33 GHz Dual Core Woodcrest Processors
4 Gb RAM
5x73 GB Ultra320 SCSI RAID 5 (288 GB storage)

I've heard that RAID 5 is not necessarily the best performer. Also, are
there any special tricks when partition the file system?

Regards,

Willo


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 10:29 AM
Richard Huxton
 
Posts: n/a
Default Re: Hardware spec

Willo van der Merwe wrote:
> Hi guys,
>
> I'm have the rare opportunity to spec the hardware for a new database
> server. It's going to replace an older one, driving a social networking
> web application. The current server (a quad opteron with 4Gb of RAM and
> 80Gb fast SCSI RAID10) is coping with an average load of ranging between
> 1.5 and 3.5.
>
> The new machine spec I have so far:


What's the limiting factor on your current machine - disk, memory, cpup?

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-19-2008, 10:29 AM
Willo van der Merwe
 
Posts: n/a
Default Re: Hardware spec

Richard Huxton wrote:
> Willo van der Merwe wrote:
>> Hi guys,
>>
>> I'm have the rare opportunity to spec the hardware for a new database
>> server. It's going to replace an older one, driving a social networking
>> web application. The current server (a quad opteron with 4Gb of RAM and
>> 80Gb fast SCSI RAID10) is coping with an average load of ranging between
>> 1.5 and 3.5.
>>
>> The new machine spec I have so far:

> What's the limiting factor on your current machine - disk, memory, cpup?

I'm a bit embarrassed to admit that I'm not sure. The reason we're
changing machines is that we might be changing ISPs and we're renting /
leasing the machines from the ISP.

---------------------------(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
  #4 (permalink)  
Old 04-19-2008, 10:29 AM
Jean-David Beyer
 
Posts: n/a
Default Re: Hardware spec

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Willo van der Merwe wrote:
> Richard Huxton wrote:
>> Willo van der Merwe wrote:
>>> Hi guys,
>>>
>>> I'm have the rare opportunity to spec the hardware for a new database
>>> server. It's going to replace an older one, driving a social
>>> networking web application. The current server (a quad opteron with
>>> 4Gb of RAM and 80Gb fast SCSI RAID10) is coping with an average load
>>> of ranging between 1.5 and 3.5.
>>>
>>> The new machine spec I have so far:

>> What's the limiting factor on your current machine - disk, memory,
>> cpup?

> I'm a bit embarrassed to admit that I'm not sure. The reason we're
> changing machines is that we might be changing ISPs and we're renting /
> leasing the machines from the ISP.
>

Before you get rid of the current ISP, better examine what is going on with
the present setup. It would be good to know if you are memory, processor, or
IO limited. That way you could increase what needs to be increased, and not
waste money where the bottleneck is not.

- --
.~. Jean-David Beyer Registered Linux User 85642.
/V\ PGP-Key: 9A2FC99A Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 07:10:01 up 28 days, 10:32, 4 users, load average: 5.48, 4.77, 4.37
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with CentOS - http://enigmail.mozdev.org

iD8DBQFG3+FwPtu2XpovyZoRAmp+AJ9R4mvznqJ24ZCPK8DcTA sz2d34+QCfQzhH
vmXnoJO0vm/A/f/Ol0TOy6o=
=9rsm
-----END PGP SIGNATURE-----

---------------------------(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:29 AM
Willo van der Merwe
 
Posts: n/a
Default Re: Hardware spec

Jean-David Beyer wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Willo van der Merwe wrote:
>
>> Richard Huxton wrote:
>>
>>> Willo van der Merwe wrote:
>>>
>>>> Hi guys,
>>>>
>>>> I'm have the rare opportunity to spec the hardware for a new database
>>>> server. It's going to replace an older one, driving a social
>>>> networking web application. The current server (a quad opteron with
>>>> 4Gb of RAM and 80Gb fast SCSI RAID10) is coping with an average load
>>>> of ranging between 1.5 and 3.5.
>>>>
>>>> The new machine spec I have so far:
>>>>
>>> What's the limiting factor on your current machine - disk, memory,
>>> cpup?
>>>

>> I'm a bit embarrassed to admit that I'm not sure. The reason we're
>> changing machines is that we might be changing ISPs and we're renting /
>> leasing the machines from the ISP.
>>
>>

> Before you get rid of the current ISP, better examine what is going on with
> the present setup. It would be good to know if you are memory, processor, or
> IO limited. That way you could increase what needs to be increased, and not
> waste money where the bottleneck is not.
>

Good advice. After running a vmstat and iostat, it is clear, to my mind
anyway, that the most likely bottleneck is IO, next is probably some
more RAM.
Here's the output:
procs -----------memory---------- ---swap-- -----io---- --system--
----cpu----
r b swpd free buff cache si so bi bo in cs us sy
id wa
0 0 29688 80908 128308 3315792 0 0 8 63 6 8 17
2 80 1


avg-cpu: %user %nice %sys %iowait %idle
17.18 0.00 1.93 0.81 80.08

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 14.57 66.48 506.45 58557617 446072213
sda1 0.60 0.27 4.70 235122 4136128
sda2 0.38 0.77 2.27 678754 2002576
sda3 2.37 0.49 18.61 429171 16389960
sda4 0.00 0.00 0.00 2 0
sda5 0.71 0.66 5.46 578307 4807087
sda6 0.03 0.01 0.24 6300 214196
sda7 0.02 0.00 0.19 2622 165992
sda8 60.19 64.29 474.98 56626211 418356226


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-19-2008, 10:29 AM
Florian Weimer
 
Posts: n/a
Default Re: Hardware spec

* Willo van der Merwe:

> Good advice. After running a vmstat and iostat, it is clear, to my
> mind anyway, that the most likely bottleneck is IO, next is probably
> some more RAM.


> Here's the output:
> procs -----------memory---------- ---swap-- -----io---- --system--
> ----cpu----
> r b swpd free buff cache si so bi bo in cs us
> sy id wa
> 0 0 29688 80908 128308 3315792 0 0 8 63 6 8 17
> 2 80 1


You need to run "vmstat 10" (for ten-second averages) and report a
couple of lines.

> avg-cpu: %user %nice %sys %iowait %idle
> 17.18 0.00 1.93 0.81 80.08


Same for iostat.

Your initial numbers suggest that your server isn't I/O-bound, though
(the percentage spent in iowait is much too small, and so are the tps
numbers).

--
Florian Weimer <fweimer@bfk.de>
BFK edv-consulting GmbH http://www.bfk.de/
Kriegsstraße 100 tel: +49-721-96201-1
D-76133 Karlsruhe fax: +49-721-96201-99

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-19-2008, 10:29 AM
Florian Weimer
 
Posts: n/a
Default Re: Hardware spec

* Willo van der Merwe:

> Florian Weimer wrote:
>> You need to run "vmstat 10" (for ten-second averages) and report a
>> couple of lines.


> 2 80 1
> 5 0 61732 37052 28180 3431956 0 0 14 987 2320 2021 38


> sda3 3.30 0.00 26.40 0 264
> sda8 97.90 0.00 783.20 0 7832


These values don't look I/O bound to me. CPU usage is pretty low,
too.

--
Florian Weimer <fweimer@bfk.de>
BFK edv-consulting GmbH http://www.bfk.de/
Kriegsstraße 100 tel: +49-721-96201-1
D-76133 Karlsruhe fax: +49-721-96201-99

---------------------------(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
  #8 (permalink)  
Old 04-19-2008, 10:30 AM
Willo van der Merwe
 
Posts: n/a
Default Re: Hardware spec

Florian Weimer wrote:
> You need to run "vmstat 10" (for ten-second averages) and report a
> couple of lines.
>

procs -----------memory---------- ---swap-- -----io---- --system--
----cpu----
r b swpd free buff cache si so bi bo in cs us sy
id wa
1 0 61732 47388 27908 3431344 0 0 10 65 1 4 17
2 80 1
5 0 61732 37052 28180 3431956 0 0 14 987 2320 2021 38
4 56 2
1 0 61620 43076 28356 3432256 0 0 0 367 1691 1321 28
3 67 1
3 0 61620 37620 28484 3432740 0 0 0 580 4088 6792 40
5 54 1
2 0 61596 33716 28748 3433520 0 0 24 415 2087 1890 44
4 49 2
3 0 61592 45300 28904 3416200 3 0 61 403 2282 2154 41
4 54 1
7 0 61592 30172 29092 3416964 0 0 19 358 2779 3478 31
6 63 1
1 0 61580 62948 29180 3417368 6 0 27 312 3632 4396 38
4 57 1
1 0 61444 62388 29400 3417964 0 0 6 354 2163 1918 31
4 64 1
2 0 61444 53988 29648 3417988 0 0 0 553 2095 1687 33
3 63 1
1 0 61444 63988 29832 3418348 0 0 6 352 1767 1424 22
3 73 1
1 1 61444 51148 30052 3419148 0 0 50 349 1524 834 22
3 74 2
1 0 61432 53460 30524 3419572 7 0 7 868 4434 6706 43
6 49 2
1 0 61432 58668 30628 3420148 0 0 0 284 1785 1628 27
3 69 1

iostat sda8 is the where the pg_data resides, sda3 is /var/log
avg-cpu: %user %nice %sys %iowait %idle
17.36 0.00 1.96 0.82 79.86
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda3 2.38 0.49 18.71 432395 16672800
sda8 62.34 74.46 491.74 66345555 438143794

avg-cpu: %user %nice %sys %iowait %idle
30.50 0.00 3.57 1.70 64.22
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda3 5.60 0.00 44.80 0 448
sda8 120.20 134.40 956.00 1344 9560

avg-cpu: %user %nice %sys %iowait %idle
20.68 0.00 3.43 1.35 74.54
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda3 3.30 0.00 26.40 0 264
sda8 97.90 0.00 783.20 0 7832

avg-cpu: %user %nice %sys %iowait %idle
22.31 0.00 2.75 0.68 74.27
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda3 2.10 0.00 16.78 0 168
sda8 60.34 0.80 481.92 8 4824

avg-cpu: %user %nice %sys %iowait %idle
11.65 0.00 1.60 1.03 85.72
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda3 1.70 0.00 13.61 0 136
sda8 59.36 0.00 474.87 0 4744


---------------------------(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
  #9 (permalink)  
Old 04-19-2008, 10:32 AM
Decibel!
 
Posts: n/a
Default Re: Hardware spec

On Thu, Sep 06, 2007 at 11:26:46AM +0200, Willo van der Merwe wrote:
> Richard Huxton wrote:
> >Willo van der Merwe wrote:
> >>Hi guys,
> >>
> >>I'm have the rare opportunity to spec the hardware for a new database
> >>server. It's going to replace an older one, driving a social networking
> >>web application. The current server (a quad opteron with 4Gb of RAM and
> >>80Gb fast SCSI RAID10) is coping with an average load of ranging between
> >>1.5 and 3.5.
> >>
> >>The new machine spec I have so far:

> >What's the limiting factor on your current machine - disk, memory, cpup?

> I'm a bit embarrassed to admit that I'm not sure. The reason we're
> changing machines is that we might be changing ISPs and we're renting /
> leasing the machines from the ISP.


Get yourself the ability to benchmark your application. This is
invaluable^W a requirement for any kind of performance tuning.
--
Decibel!, aka Jim Nasby decibel@decibel.org
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.3 (FreeBSD)

iD8DBQFG5vwqdO30qud8SkgRAtekAJ4tqwtP1sJXdxXIzCE8aP 6brs2ffwCff2FB
dvup+7zMXlp+OzJgCadZ988=
=b+F1
-----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 04-19-2008, 10:32 AM
Willo van der Merwe
 
Posts: n/a
Default Re: Hardware spec

Decibel! wrote:
> On Thu, Sep 06, 2007 at 11:26:46AM +0200, Willo van der Merwe wrote:
>
>> Richard Huxton wrote:
>>
>>> Willo van der Merwe wrote:
>>>
>>>> Hi guys,
>>>>
>>>> I'm have the rare opportunity to spec the hardware for a new database
>>>> server. It's going to replace an older one, driving a social networking
>>>> web application. The current server (a quad opteron with 4Gb of RAM and
>>>> 80Gb fast SCSI RAID10) is coping with an average load of ranging between
>>>> 1.5 and 3.5.
>>>>
>>>> The new machine spec I have so far:
>>>>
>>> What's the limiting factor on your current machine - disk, memory, cpup?
>>>

>> I'm a bit embarrassed to admit that I'm not sure. The reason we're
>> changing machines is that we might be changing ISPs and we're renting /
>> leasing the machines from the ISP.
>>

>
> Get yourself the ability to benchmark your application. This is
> invaluable^W a requirement for any kind of performance tuning.
>

I'm pretty happy with the performance of the database at this stage.
Correct me if I'm wrong, but AFAIK a load of 3.5 on a quad is not
overloading it. It also seem to scale well, so if application's demand
increases I see a minimal increase in database server load.

I was just looking for some pointers as to where to go to ITO hardware
for the future, as I can now spec a new machine. I mean is it really
worth while going for one of those RAID controllers with the battery
backed cache, for instance. If so, are there any specific ones to look
out for? Which is better RAID 5, a large RAID 10 or smaller RAID 10's?
Should I bother with RAID at all?



---------------------------(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
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 11:31 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