John Stanton uttered:
Jay Sprenkle wrote:
On 6/14/06, RohitPatel9999 <[EMAIL PROTECTED]> wrote:
Any solution to that (which does not force end-user of app to manage
sqlite
file fragments or to defragment disk) ?
A scheduled task or cron job is trivial to implement and does not
add any extra work for the end user. Making Sqlite smart enough
to manipulate the operating systems storage management is
NOT trivial and would need to be different for every operating system.
We have a saying that applies: "There is no free lunch"
If the disk is kept is a tidy state with regularly scheduled defragmentation
then the files which grow do not get gross fragmentation.
If there were a way to stop file fragmentation without requiring any
management effort there would be no need for defrag programs. With current
file systems we need defraggers. A fact of life like death and taxes.
I've never, ever defragged a UNIX box in my life. Keeping the amount of
free space reasonable goes a long way to helping an OS avoid
fragmentation. I only have the issue on Windows when I'm running out of
disk space on a device. The other pain on Windows is the lack of swap
partition support, which would be a massive performance benefit when
memory is overcommitted. A fragmented swap file is a definite performance
killer.
I don't know if cylinder groups help particularly for UNIX. I guess it
must do as even a fragmented file will have it's fragments close
together. There is a ext2 defragger, but it doesn't work with ext3 and
hasn't been updated since 2002.
I can't wait to play with ZFS on Solaris. Doesn't look fragmentation
prone. And with point in time writeable snapshots, it should even be safe
to take a snapshot copy of a directory containing a SQLite database and
SQLite will just do the right thing upon using the snapshot (the journal
will be snapshot atomically with the DB file.)
Christian
--
/"\
\ / ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
X - AGAINST MS ATTACHMENTS
/ \