Thread: Re: mirroring data on different drives?
Someone please please help me!!!! :-( Steve Steve wrote: > Hi, > > I've been running postgres on my server for over a year now and the > tables have become huge. I have 3 tables that have data over 10GB each > and these tables are read very very frequently. In fact, heavy searches > on these tables are expected every 2 to 3 minutes. This unfortunately > gives a very poor response time to the end user and so I'm looking at > other alternatives now. > > Currently, the postgresql installation is on a single disk and so all > the tables have their data read from a single disk. Searching on > different tables by multiple users at the same time results in very slow > searches, as it's mainly dependant on the spindle speed. I recently > gained access to another server which has 3 SCSI disks. I know there is > a way to mirror the tables across the three different disks but I'm not > sure if it's as easy as symlinking the files (WAL files only?) across. > Can anyone please tell me what to do here and how to harness the power > of the three SCSI drives that I have. Which files in the data directory > need to be moved? Is this safe? Can backups etc be easily done? Any > information will be greatly appreciated. Thank you, > > Steve > > ------------ And now a word from our sponsor ------------------ > For a quality usenet news server, try DNEWS, easy to install, > fast, efficient and reliable. For home servers or carrier class > installations with millions of users it will allow you to grow! > ---- See http://netwinsite.com/sponsor/sponsor_dnews.htm ----
Steve <steve@nospam.postgresql.org> wrote: > > Someone please please help me!!!! :-( [snip] Relax, Steve. The people helping-out on PostgreSQL mailing lists are in 24 timezones, have real jobs (for which they actually get paid), are all volunteers (for which they don't get paid), may be going to school, take vacations, sleep, etc. It may take some time, maybe hours, or even days, depending on a variety of factors, for somebody to address your question(s). And that's assuming somebody knows, has the time, and will take an interest. I'm no expert in pgsql performance, but I suspect you'd be better-off with UW-SCSI drives in a RAID array, than doing things like trying to put different bits on different drives. There are reams of other questions, such as: Do you "vacuum analyze" regularly? Do you have sufficient sort memory? It may be that your question(s) would be more appropriately directed to the performance mailing list, rather than general. You might also help yourself by spending some time searching/browsing the performance, admin and general mailing lists archives for past discussions of issues similar to yours. Jim
Steve <steve@nospam.postgresql.org> wrote: > Someone please please help me!!!! :-( > > Steve > > Steve wrote: > > Hi, > > > > I've been running postgres on my server for over a year now and the > > tables have become huge. I have 3 tables that have data over 10GB each > > and these tables are read very very frequently. In fact, heavy searches > > on these tables are expected every 2 to 3 minutes. This unfortunately > > gives a very poor response time to the end user and so I'm looking at > > other alternatives now. > > > > Currently, the postgresql installation is on a single disk and so all > > the tables have their data read from a single disk. Searching on > > different tables by multiple users at the same time results in very slow > > searches, as it's mainly dependant on the spindle speed. I recently > > gained access to another server which has 3 SCSI disks. I know there is > > a way to mirror the tables across the three different disks but I'm not > > sure if it's as easy as symlinking the files (WAL files only?) across. > > Can anyone please tell me what to do here and how to harness the power > > of the three SCSI drives that I have. Which files in the data directory > > need to be moved? Is this safe? Can backups etc be easily done? Any > > information will be greatly appreciated. Thank you, The answer to your question is OS/hardware dependent. The best alternative is to have hardware-based RAID with battery backing. This provides excellent speed with good safety. The next option is to use some sort of software RAID. How to do this depends on the OS you are using, and will be covered in the docs for that OS. I don't think a lot of symlinking is a very good way to distribute your data. Many folks have had success by keeping the data and the WAL on seperate disks, but that leaves you with a third disk that isn't helping any. -- Bill Moran Potential Technologies http://www.potentialtech.com
Steve wrote: > Someone please please help me!!!! :-( Hi Steve, How much leverage over the design of the application do you have? Depending on the data that's being accessed, it may be worth looking into materialised views for some of the data. Very application dependent on course: http://www.varlena.com/varlena/GeneralBits/Tidbits/matviews.html Hope that helps. Regards and best wishes, Justin Clift > Steve > > Steve wrote: > >> Hi, >> >> I've been running postgres on my server for over a year now and the >> tables have become huge. I have 3 tables that have data over 10GB each >> and these tables are read very very frequently. In fact, heavy >> searches on these tables are expected every 2 to 3 minutes. This >> unfortunately gives a very poor response time to the end user and so >> I'm looking at other alternatives now. >> >> Currently, the postgresql installation is on a single disk and so all >> the tables have their data read from a single disk. Searching on >> different tables by multiple users at the same time results in very >> slow searches, as it's mainly dependant on the spindle speed. I >> recently gained access to another server which has 3 SCSI disks. I >> know there is a way to mirror the tables across the three different >> disks but I'm not sure if it's as easy as symlinking the files (WAL >> files only?) across. Can anyone please tell me what to do here and how >> to harness the power of the three SCSI drives that I have. Which files >> in the data directory need to be moved? Is this safe? Can backups etc >> be easily done? Any information will be greatly appreciated. Thank you, >> >> Steve