----- Original Message ----- From: "Matthias Julius" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Friday, December 05, 2008 5:12 PM Subject: Re: [Tilesathome] Using RAM-drive for ROMA temp tables
> Florian Lohoff <[EMAIL PROTECTED]> writes: > >> On Fri, Dec 05, 2008 at 02:55:07PM -0500, Milenko wrote: >>> Hey all, >>> >>> Has anyone played with using a ramdrive to store the >>> temp >>> tables in map.fcgi? There are 6 different temp tables used to store >>> data >>> before it's dumped to the client. I wonder if there would be a >>> significant >>> speed increase if these could be stored in RAM instead of on disk. The >>> script creates a "mirrored" tablespace before creating the temp tables, >>> if >>> this tablespace where to point to a filesystem in RAM would that >>> accomplish >>> this? I currently have it set to a separate directory on disk, but >>> nothing >>> is ever created there so I'm not sure if it's actually being used to >>> anything. >> >> I tried with a different tablespace on seperate speedy disks and it >> didnt make a difference as the linux kernel is clever enough to >> not let these short lived tables hit the disk > > That't what I would have guessed, too. If you have enough RAM to > create a RAM drive the kernel also has enough memory to cache the data > if you leave the memory to the kernel instead. > > Matthias I can confirm this. I went ahead and mounted a ram-drive using tmpfs. Then created a new tablespace located there. I changed map.fcgi to use temp_tablespaces instead of default_tablespace and pointed it at the new tablespace. Pgsql is using the space, but I see no difference in performance. When monitoring the disk-based tablespace, it doesn't appear pgsql is even storing files there, so the kernel must be caching them automagically. I guess the only performance option is to throw more discs in the array. I hoped the 4 10k rpm velociraptors would hold up better than they are. Iostat shows 250 - 300% i/o wait during heavy load with 7 - 8 instances. Everything else looks good - the system is just sitting waiting for the discs. Maybe 8 of the new Intel SSDs in RAID0 would speed things up... :) -Jeremy _______________________________________________ Tilesathome mailing list [email protected] http://lists.openstreetmap.org/listinfo/tilesathome
