Hi folks,

I had a chat with #postgres @ FreeNode IRC people about
keeping database files in AFS. And I'm not as enthusiastic
as I was about the idea.

I am not too worried about the file locking issues (because of
the predictable pattern of access we will have), but I am 
more concerned about the fact that AFS doesn't write files
until you close() them.
... And mysql at least (and I suppose postgres too, until you have
a lot of databases - open files) does not close() files ever
in normal operation.

This could accumulate a lot of data (where? in memory?)
that could all be lost in case of an unpredictable failure...
Or it would cause massive writes at once when files
are closed.

In any case, we'd be introducing a huge uncertainity into an area
that people struggled to make flawless and reliable.


So I went seeing other options and calculating our disk space limits a
little...  We currently have a 100 GB /home partition on fyodor, which is
50% full with about 120 users.

Disk usage shows that top 15 biggest disk users take up about
28 GB, which is about the half of total used space. In other words,
every 8th user uses about 1.8 GB of space.

And we have mysql/postgres databases where about 130 MB
is in postgres, and about 250 MB is in MySQL.


So, putting those numbers in the context of available disk space
on Deleuze (file & db server), where we have 140 GB available,
I made a very conservative calculation (underestimated available
disk space, and overestimated every 8th user's usage):

  If we pretend we only have 100 GB, and big users (every 8th)
  together fill half of it, it turns out we can support
  200 "normal" users and 25 "big" users.

  That still leaves 40 GB free for databases (of which we currently,
  with 120 users - use only 500 MB) and an extra cushion we can use
  to increase either afs space or database space, depending how real
  circumstances turn out to be in the future...

And plugging this extra gigabytes into the system later for any purpose
wouldn't be too hard, since

 * for AFS, we'd create new user volumes in another partition, /vicepb/...
 * for Postgres, we'd create tablespace at say, /mnt/diskb/...
 * for MySQL, we'd create symlink to dir in /mnt/diskb/...


And still, for backup, and keeping databases in AFS, we could perform
nightly database dumps (mysqldump, pg_dump...) and put dumps
in form of files to user's AFS directories.

What do you think?

-doc

_______________________________________________
HCoop-SysAdmin mailing list
[email protected]
http://hcoop.net/cgi-bin/mailman/listinfo/hcoop-sysadmin

Reply via email to