[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Database twice as large as the original...

From: <cmpilato_at_collab.net>
Date: 2001-12-06 15:45:52 CET

cmpilato@collab.net writes:

> "Jay Freeman \(saurik\)" <saurik@saurik.com> writes:
>
> > Is there a reason why the size on the server after an import is twice as
> > large as the size of the files that were uploaded into the repository?
> > This seems really screwy to me.
>
> I've not duplicated this example (yet), but if you use 'du -k' do you
> get different results?

Okay, now I have duplicated it. I imported a directory of song
lyrics, sized as such:

   ~/public_html % du -sk lyrics
   352 lyrics

Then I looked at the size of the repository:

   ~/public_html % du -k /usr/www/repositories/test
   4 /usr/www/repositories/test/dav
   4 /usr/www/repositories/test/conf
   8 /usr/www/repositories/test/locks
   24 /usr/www/repositories/test/hooks
   1496 /usr/www/repositories/test/db
   1544 /usr/www/repositories/test

Wow. That looks big. But let's check out that db/ folder. I
suspect...

   ~/public_html % du -k /usr/www/repositories/test/db/*
   8 /usr/www/repositories/test/db/__db.001
   268 /usr/www/repositories/test/db/__db.002
   36 /usr/www/repositories/test/db/__db.003
   228 /usr/www/repositories/test/db/__db.004
   12 /usr/www/repositories/test/db/__db.005
   560 /usr/www/repositories/test/db/log.0000000001
   8 /usr/www/repositories/test/db/nodes
   8 /usr/www/repositories/test/db/representations
   8 /usr/www/repositories/test/db/revisions
   348 /usr/www/repositories/test/db/strings
   8 /usr/www/repositories/test/db/transactions

Ah, yes. The strings table (full of the actual file contents + dir
entries list) looks to be about the right size. But those __db* files
are shared memory regions, storing state for would-be concurrent
accessors. And the log file? That's BDB journaling data. So,
really, the extra data is BDB overhead.

So there you have it.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:51 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.