Forum OpenACS Q&A: OpenACS memory requirements

Collapse
Posted by Douglas Rosser on
I've been running ACS on Oracle for a few days and "noticed" that
it's quite a memory pig. I used every scrap of my 128Megs of RAM and
256Megs of swap and I'm quite surprised the machine didn't come
crashing down.

How resource-intensive is OpenACS on PostgreSQL?

Collapse
Posted by Don Baccus on
Postgres is far less resource intensive than Oracle.  In fact, today's  Oracle is far more resource intensive than last year's model, just another reason not to use it, IMO, unless you need all the functionality that piggishness supposedly makes possible.

Your 128MB machine will work fine, even after you start up the Postmaster with a "-B 1000" switch (assuming you've compiled PG with a 16KB datablock size), causing it to use 16 MB for its shared buffer pool.

I do my OpenACS development work on two machines, a small tower and a laptop, each with 128MB, each running X and gobs of others stuff I find useful on a development machine, and swapping's a very, very rare  event.

Collapse
Posted by Li-fan Chen on
You might get an unique opportunity with PostgreSQL and AOLserver to serve more people:
  • Because memory is quite cheap and fast now days.
  • Even those fancy ECC ram.
  • If you don't give PostgreSQL more ram than it knows what to do with (is this possible? nah *grin*), you could always utilize it as caching.
  • Caching could be as simple as more extensive use of nsv_set or ns_share caching of oft requested sql views through util_memoize or whatever. This could work for some applications, like chats.
  • Heck do this: 1) lilo: linux ramdisk=512000 and then 2) format a ram disk (e.g./dev/ram4) and then mount -t ext2 /dev/ram4 /usr/local/pgsql/data. Why do this? It could be slightly better security-wise to never write to the hard drive for sensitive information. Or only encrypt what you write to the hard drive. But...
    • You probably use OpenBSD if you care that much about security for a web server anyway..
    • You'd also have to mark swap off for whatever encryption keys you have in ram--if that's not possible--at least encrypt the swapping and ensure you very very rarely swap
    • But a ram disk not so smart in terms of achieving ACID--unless you have two servers at two different cohosts mirroring each other's ram drive Oh no, I'm babbling.. daydreaming.... :-(
Collapse
Posted by Li-fan Chen on
If you want to help your Oracle box run better consider making sure your unix installation is tight.
  • For example, when you install RedHat, there's a custom install option which lets you have as few running daemons as possible.
  • If you can survive developing with console tools then get rid of X. X isn't always a hot but usually the programs you run in it is. (for example StarOffice, Netscape, GIMP)
  • You should probably have CVS, vim/emacs, a caching DNS server, ppp/dhcp client (optional), AOLserver, Qmail, screen and Oracle and not much more. (would Don or Ben give us an idea of what their development boxes have? Thanks!)
  • Make sure you learn to tune your Oracle installation so that it isn't running too many threads or processes.
  • If you are writing your own website (that's not dependent on ACS), you will be responsible for tuning the SQL as well--which again helps you improve performance if not memory usage.
  • Also use another box to do things graphical. Any 486DX66+ will run Netscape 3-4 capably, and that's all you need to really access your ACS server after all, so get a secondary development box from a garage sale or something.
  • Also, avoid spending too much on multimedia for your ACS server, just that cost saving alone will help you pay for more ram hard storage subsystem. This is a problem if you initially bought your machine to do something else completely different (like to do your college papers and keep in touch with your friends with IP phone or burn MP3s or play Quake)
  • If this is a production machine you might want to talk to a Oracle specialist friend to help you make your next Oracle box purchase capable enough for your ACS installation.

There are too many factors that could affect your Oracle installation and you'll learn to think about all the various issues. I think the same can be said for ACS for PostgreSQL in production use. Both database product have special needs. You just have to keep "tuning" and learn from past mistakes.