From: ahoward Date: 2003-01-31T09:04:15+09:00 Subject: Re: drb experts On Fri, 31 Jan 2003, Eric Hodel wrote: > This will work well if you can load all the database drivers on the client > end (once per client), and will perform the best because DRb is only > dispatching database connections. well, the client and server will be the same in my case - i plan to use this object from cgi programs. > This will result in the least memory overhead, but DRb may become a > bottleneck if you have to do alot of database activity. Remember DRb spawns > a thread per request. yes, this does seem like a bottle neck. in general, what types of data needs thread protection when programming drb? > Well, if you have only a few database requests, or have low memory, go > with option b. If you have a ton of memory, or are doing many database > queries, go with option a. 2GB or 512GB of RAM - primary/secondar ha-linux machines. > If you're going to be using this with Apache, you'll be a tough call. Is > the overhead of having the PG drivers in each Apache process worth it? > Probably yes if you have a ton of memory or don't have many Apache processes > hanging around. If you are low on memory, or only do a few DB queries/page, > then you may be better off having DRb handle everything. you lost me. why would the pg drivers be loaded into apache in either case? i'm envisioning a pool which fires up idependently from cgi programs or apache, cgi programs will either get a proxy object delegating calls to the drb object which _does_ have the drivers loaded, or a handle (guess this is a proxy too ;0) to the actuall connection object. in either case it seems like only the server(s) would have the postgresql.so in memory? i'm not using mod_ANYTHING. -a > > --=20 > Eric Hodel - drbrain@segment7.net - http://segment7.net > All messages signed with fingerprint: > FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04 > > > --l0l+eSofNeLXHSnY > Content-Type: application/pgp-signature > Content-Disposition: inline > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.0 (FreeBSD) > > iD8DBQE+Oag7MypVHHlsnwQRAotyAKCqcn+dVn8kcxfkXn4Fh85r2H8MuwCfapxJ > MU3urb6kNpJ1Fi+Etikw6Wg= > =a39h > -----END PGP SIGNATURE----- > > --l0l+eSofNeLXHSnY-- > > -- ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ahoward@fsl.noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 ====================================