View Single Post
Old 11-17-2021, 06:50 PM   #6703
bpothier
Member
bpothier began at the beginning.
 
Posts: 20
Karma: 10
Join Date: May 2020
Device: Kobo
UPDATE3: TLDR - "fixed" DB performance issue... Library & DB were on NAS, copied metadata.db to local drive and set ENV VAR "CALIBRE_OVERRIDE_DATABASE_PATH" to point to local file.... metadata update of 14 ePUB dropped to 5 seconds.

Ref: https://www.mobileread.com/forums/sh...d.php?t=294998

Hopefully this helps someone else with DB perf issues...
Details:
Spoiler:
Upgraded to Calibre 5.32. The 14 books that took 8m to update now took 4m. Still an age, but progress. "Only" around 20k books in Library, DB is around 120MB.
Found forum thread - https://www.mobileread.com/forums/sh...d.php?t=294998 - with perf issues around opening/adding/importing. It suggested moving DB file and adding a symlink or setting ENV var. Tried to create windows symlink on NAS share to local disk without success (tried as local admin, changed fsutil R2L symlink option). Setting the ENV variable "CALIBRE_OVERRIDE_DATABASE_PATH=D:\CalibreDB\metad ata.db" does work, though it is less flexible for multiple libraries. After copying DB to local drive, doing FFF metadata update from stored column took... 5 seconds..... Likely will create a few CMD/batch files to set ENV and start Calibre as a workaround. The docs do mention NAS performance issues around locking support, but have not delved into that yet. I don't switch Calibre Libraries very often, so will likely keep it this way for now... Might add a DB copy on startup from local to NAS in the batch script for safety...
I think one issue with the DB on the NAS is how Calibre updates the file. I have "recyclebin" enabled on the NAS and when Calibre does a DB update it creates and deletes a temporary metadata.db-journal file. These seem to have accumulated in the NAS recyclebin as "Copy #1234 of metadata.db-journal" and there are now thousands of them...
bpothier is offline   Reply With Quote