Subject | Re: Database on USB-attached storage? |
---|---|
Author | nathan_probst |
Post date | 2006-01-31T20:02:24Z |
See end of message!
--- In firebird-support@yahoogroups.com, Lester Caine <lester@l...> wrote:
>
> Ivan Cruz wrote:
>
> > nathan_probst wrote:
> >
> >>"Our database will reside on a USB-attached disk with the server
> >>running on the host system.
> >
> > Fine. It answers my previous question on the first thread. That
said, there
> > are two issues you probably have not considered yet:
> >
> > 1. bandwidth. Using USB 1 performance will be acceptable only on very
> > small databases. I will not risk betting on the maximum practical
size.
> > USB 2 may provide acceptable performance, but I believe it's better
> > make tests before going ahead. Why am I worried? Because Firebird is
> > notoriously bad on caching databases. It uses disk (read: USB
bandwidth)
> > intensively even when you have tons of RAM.
>
> Actually I see better performance on the USB2 port than when the
> database is on the IDE disk - probably because all that is being
> accessed from the disk is the database - windows is running from the
> local disk.
>
That is my experience also. BTW, USB2 is a requirement for our
application. USB1.1 is not allowed. (Whew!)
> > 2. endurance. Most NAND flash used in USB disks have an endurance of
> > 1,000,000 erase cycle. Looks a lot but, depending on the application
> > it's not.
> > Databases are not designed with that limitation in mind and certainly
> > endurance can be a real problem for you. For more details, check
Wikipedia:
> > http://en.wikipedia.org/wiki/Flash_memory
>
> I think the wording is correct here - USB-attached disk - rather than a
> flash disk ;) The little 4 and 6Gb hard disk units are great for
> carrying data from one site to another. Though the firewire ones may
> give better performance, and the SATA external drives are now much the
> same price.
>
Exactly. We're talking about 40GB HDDs here. (I should have been
clearer on that...)
> >>What is likely to happen
> >>(under Windows) to a FB database that is unplugged at unpredictable
> >>(and probably the worst possible) times? Will the whole db be lost?
> >>What are the recovery options? Anything I haven't considered?"
> >
> > I believe configuring your database for "Forced Writes" can
minimize the
> > risks when using Windows, but you will never be completely sure.
>
> I have had a few goes at trying to pull the plug while the disk
seems to
> be busy, but I have not been able to mess up the database yet. But as
> always - care needs to be taken to backup from time to time.
>
> Best approach *IS* to copy the database TO the machine, and then copy
> back when finished. *THEN* you have another backup :)
Now this is interesting...how might FB's "shadow database" facility
factor into this? We were talking about this issue yesterday and I
wondered to myself about keeping the "master" database on the host and
configuring a "shadow" on the USB HDD. Any tips about managing a
shadow db that is intermittently available? Does FB have some sort of
commit logging to "catch up" the shadow when it comes available again?
Thanks again,
Nathan