Обсуждение: RE: [GENERAL] advice on buying sun hardware to run postgres
While this message is a few days late, Linux does work on more than 2 processors. I don't know the full details, but before the 2.2 series of kernels for Linux was released, someone on the Linux-SMP list showed their boot messages. It was on a Sun (don't know which one) Sparc system with either 12, 20, or 22 processors (I don't remember how many -- search the archives if anyone is really interested). While not a typical Linux installation and not Intel, it did work with more than 4 processors. I don't know how FreeBSD SMP compares to Linux. Linux SMP works quite nicely on the systems I have running (dual PPro 200 with 256 meg RAM and IDE hard drives). The IDE drives are definitely a bottleneck on large table queries. I'm looking to move to SCSI. As for the Intel vs. Sun SMP for this, Linux Postgres has worked very very nicely for me so far. And performance has been pretty decent. I'm moving more and move into the Postgres server. This server does both web and postgres work for intranet applications. All of this on hardware that was 'retired' after desktops were upgraded. Bang for the buck, I can't argue with the Linux/Intel combination. This would also seem to apply for FreeBSD, even though I've never ran it and don't know anything about its capabilities. Gregory S. Youngblood ext 2164 -----Original Message----- From: Chris Bitmead [mailto:chris.bitmead@bigfoot.com] Sent: Monday, April 26, 1999 4:47 AM To: Bruce Momjian Cc: eric@broken.net; pgsql-general@postgreSQL.org Subject: Re: [GENERAL] advice on buying sun hardware to run postgres Bruce Momjian wrote: > > > I am going to buying a sun server to run postgres > > on as a backend database server for a www site. Does anyone > > have suggestions on what to buy? Does anyone have > > advice on running postgres on solaris or suggestions not to? > > My budget is 5k to 10k but i'm looking for a machine that > > can scale cpus and memory. > > IDE is just plain slow on Unix. Unix does much better with SCSI, > especially when there are multiple disks. Oh I don't know. If you've only got 1 or 2 disks you may find IDE sufficient. (well it works nicely for me.) > > Does anyone think i could get just as much running postgres > > on a dual pent III with linux or FreeBSD as i could on a sun > > enterprise 250? People have been commenting lately that postgres on Solaris is very slow compared to Linux. Apparently certain file system operations on Solaris is _slow_. > Good question. I know BSDI runs well on two cpu's, and I know FreeBSD > and Linux use them too. On intel platforms, you are not going to find > many OS's that can handle _more_ than two cpu's, I disagree. I think Linux 2.2 should be able to go to 4 CPUs no problem. Linus's personal machine has 4. I heard that FreeBSD's SMP isn't very advanced but I have no personal experience.
Hi, I'm running FreeBSD 2.8 and I downloaded and installed PostgreSQL 6.4. I can start postmaster (-i), but when I try to run createdb, to create a database, I get a output saying: Connection to database 'template1' failed. pqReadData() --backend closed the channel unexpectedly. This probably means the backend terminated abnormally before or while processing the request. createdb: database creation failed on userxx ------------------------------------------------------------------------------- Allan Cardech de Lemos e-mail: allan@ufrrj.br Univ. Federal Rural do Rio de Janeiro http://www.ufrrj.br Coordenadoria de Informatica Phone (+55) (21) 6821349 Rodovia Br. 465 Km 7 - Seropedica Fax (+55) (21) 6821070 CEP 23890-000 -------------------------------------------------------------------------------
I've been using PostgreSQL for a while on a project, and I needed to drop into psql just to try out some SQL to use in a program. Turns out everytime I try to create a simple table, it fails, but not in the same way... CREATE TABLE mytemp ( id integer unique not null, mystr varchar(50) ); Variation #1 says "ERROR: cannot create mytemp" Variation #2 says "pqReadData() -- backend closed the channel unexpectedly." I even destroyed and recreated the database thinking I've messed that up. I've also restarted the postmaster. I've probably forgotten something obvious, at least I hope that's the case, but since its had me stumped for 30 minutes I thought I'd ask for help. I'm using version 6.4.2. Bruce Tong | Got me an office; I'm there late at night. Systems Programmer | Just send me e-mail, maybe I'll write. Electronic Vision / FITNE | zztong@laxmi.ev.net | -- Joe Walsh for the 21st Century
[Charset iso-8859-1 unsupported, filtering to ASCII...] > While this message is a few days late, Linux does work on more than 2 > processors. > > I don't know the full details, but before the 2.2 series of kernels for > Linux was released, someone on the Linux-SMP list showed their boot > messages. > > It was on a Sun (don't know which one) Sparc system with either 12, 20, or > 22 processors (I don't remember how many -- search the archives if anyone is > really interested). While not a typical Linux installation and not Intel, it > did work with more than 4 processors. When you get above two processor, the SMP method used by Linux, FreeBSD, BSD/OS, etc do not work as well as a kernel-level SMP like Solaris. In the Linux/*BSD SMP, you can only run a kernel call on one processor at a time. With only two cpu's, the odds a two running processes both needing to do a kernel call at the same time are rare. As you get more processors, the chance of kernel contension gets higher, and you get more cpu's running idle becuase there are is no process that has non-kernel-level demands for a cpu. > I don't know how FreeBSD SMP compares to Linux. Linux SMP works quite nicely > on the systems I have running (dual PPro 200 with 256 meg RAM and IDE hard > drives). The IDE drives are definitely a bottleneck on large table queries. > I'm looking to move to SCSI. IDE does not allow multiple outstanding request, can not access multiple disks at the same time, and requires more CPU to do the transfer than SCSI. This last point is normally forgotten. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
"Allan C. Lemos" wrote: > > Hi, > I'm running FreeBSD 2.8 and I downloaded and installed PostgreSQL 6.4. I > can start postmaster (-i), but when I try to run createdb, to create a > database, I get a output saying: > Connection to database 'template1' failed. > pqReadData() --backend closed the channel unexpectedly. > This probably means the backend terminated abnormally before or while > processing the request. > createdb: database creation failed on userxx Sounds like you havn't run "initdb" yet.
Bruce Momjian wrote: > When you get above two processor, the SMP method used by Linux, FreeBSD, > BSD/OS, etc do not work as well as a kernel-level SMP like Solaris. "kernel-level"? All SMP is kernel level. Solaris does much better but there is no fundamental architectural difference as far as I know. > In the Linux/*BSD SMP, you can only run a kernel call on > one processor at a time. If that was true, why has Linus just spent 2 years making kernel locks more fine grained? If you could only run one kernel call at once anyway then they must have wasted their time eh? > IDE does not allow multiple outstanding request, can not access multiple > disks at the same time, and requires more CPU to do the transfer than > SCSI. This last point is normally forgotten. Surely IDE can handle multiple disks at the same time if they are on a different controller.
> Bruce Momjian wrote: > > > When you get above two processor, the SMP method used by Linux, FreeBSD, > > BSD/OS, etc do not work as well as a kernel-level SMP like Solaris. > > "kernel-level"? All SMP is kernel level. Solaris does much better but > there is no fundamental architectural difference as far as I know. There is. Linux/*BSD use only a big kernel lock, or several big kernel locks. Solaris allows multiple CPUs/threads to run in the cpu at the same time. This ability requires quite a bit of overhead, which make Solaris/Slowaris slower in many operations. I am no Solaris apologist, and don't prefer it myself, but it is important to understand what they are trying to do vs. Linux/*BSD. > > > In the Linux/*BSD SMP, you can only run a kernel call on > > one processor at a time. > > If that was true, why has Linus just spent 2 years making kernel locks > more fine grained? If you could only run one kernel call at once anyway > then they must have wasted their time eh? He is increasing the number of locks in the kernel, making it more fine-grained. Still probably does not have the same capability as Solaris, where kernel threads are very finely grained. > > > IDE does not allow multiple outstanding request, can not access multiple > > disks at the same time, and requires more CPU to do the transfer than > > SCSI. This last point is normally forgotten. > > Surely IDE can handle multiple disks at the same time if they are on a > different controller. Yes, but few controllers allow unique IRQ's, at least in the past, and you can't have more than 2, no? It is a kludge. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Bruce Momjian wrote: > There is. Linux/*BSD use only a big kernel lock, or > several big kernel locks. I think you're talking silly. BSD has one big lock, but my count there are around 60 locks in Linux 2.2. Solaris has thousands of locks.
drop table mytemp; (just to be sure) check for existence of file "mytemp" in database directory; if you found it - remove recreate table. this should work... cu Bruce Tong wrote: > > I've been using PostgreSQL for a while on a project, and I needed to drop > into psql just to try out some SQL to use in a program. Turns out > everytime I try to create a simple table, it fails, but not in the same > way... > > CREATE TABLE mytemp > ( > id integer unique not null, > mystr varchar(50) > ); > > Variation #1 says "ERROR: cannot create mytemp" > > Variation #2 says "pqReadData() -- backend closed the channel > unexpectedly." > > I even destroyed and recreated the database thinking I've messed that up. > I've also restarted the postmaster. > > I've probably forgotten something obvious, at least I hope that's the > case, but since its had me stumped for 30 minutes I thought I'd ask for > help. I'm using version 6.4.2. > > Bruce Tong | Got me an office; I'm there late at night. > Systems Programmer | Just send me e-mail, maybe I'll write. > Electronic Vision / FITNE | > zztong@laxmi.ev.net | -- Joe Walsh for the 21st Century -- Marcin Grondecki ojciec@mtl.pl (604)468725 *** I'm not a complete idiot - some parts are missing
> drop table mytemp; (just to be sure) > check for existence of file "mytemp" in database directory; if you > found it - remove > recreate table. It did work. Now I'm suprised because I know I did those steps yesterday in that order. Obviously I must be mistaken or there is some other unknown, but I'm willing to chalk it up to "bad juju" as long as it doesn't happen again. :) Thanks for looking into it. Bruce Tong | Got me an office; I'm there late at night. Systems Programmer | Just send me e-mail, maybe I'll write. Electronic Vision / FITNE | zztong@laxmi.ev.net | -- Joe Walsh for the 21st Century
> Bruce Momjian wrote: > > > There is. Linux/*BSD use only a big kernel lock, or > > several big kernel locks. > > I think you're talking silly. BSD has one big lock, but my count there > are around 60 locks in Linux 2.2. Solaris has thousands of locks. > > OK, *BSD has one, Linux has 60, and Solaris has thousands. This was my point. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
With FreeBSD, you should really use the port; it saves you much grief. I recommend it! cd /usr/ports/databases/postgresql && make install (with a fresh ports tree, which you get with "cvsup /usr/share/examples/cvsup/ports-supfile"). Regards, Palle "Allan C. Lemos" wrote: > > Hi, > I'm running FreeBSD 2.8 and I downloaded and installed PostgreSQL 6.4. I > can start postmaster (-i), but when I try to run createdb, to create a > database, I get a output saying: > Connection to database 'template1' failed. > pqReadData() --backend closed the channel unexpectedly. > This probably means the backend terminated abnormally before or while > processing the request. > createdb: database creation failed on userxx > > ------------------------------------------------------------------------------- > Allan Cardech de Lemos e-mail: allan@ufrrj.br > Univ. Federal Rural do Rio de Janeiro http://www.ufrrj.br > Coordenadoria de Informatica Phone (+55) (21) 6821349 > Rodovia Br. 465 Km 7 - Seropedica Fax (+55) (21) 6821070 > CEP 23890-000 > -------------------------------------------------------------------------------