Curtis Faith kirjutas T, 08.10.2002 kell 01:04: > > I may be missing something obvious, but I don't see a way to get more > > than 1 trx/process/revolution, as each previous transaction in that > > process must be written to disk before the next can start, and the only > > way it can be written to the disk is when the disk heads are on the > > right place and that happens exactly once per revolution. > > Okay, consider the following scenario. > > 1) Process A commits when the platter is at 0 degrees. > 2) There are enough XLog writes from other processes to fill 1/4 platter > rotation worth of log or 90 degrees. The SCSI drive writes the XLog commit > record and keeps writing other log entries as the head rotates. > 3) Process A receives a confirmation of the write before the platter > rotates 60 degrees. > 4) Process A continues and adds another commit before the platter rotates > to 90 degrees.
for this scheme to work there are _very_ specific conditions to be met (i.e. the number of writing processes and size of WAL records has to meet very strict criteria) I'd suspect that this will not work for 95% of cases. > This should be very possible and more and more likely in the future as CPUs > get faster and faster relative to disks. You example of >1 trx/proc/rev will wok _only_ if no more and no less than 1/4 of platter is filled by _other_ log writers. > I'm not suggesting this would happen all the time, just that it's possible > and that an SMP machine with good CPUs and a fast I/O subsystem should be > able to keep the log writing at close to I/O bandwidth limits. Keeping log writing parallel and close to I/O bandwidth limits is the real key issue there. Toms test case of fast inserting of small records by relatively small number of processes (forcing repeated writes of the same page) seems also a border case. > The case of bulk inserts is one where I would expect that for simple tables > we should be able to peg the disks given today's hardware and enough > inserting processes. bulk inserts should probably be chunked at higher level by inserting several records inside a single transaction. ----------- Hannu ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org