View Single Post
  #16  
Old April 27th 20, 07:29 PM posted to alt.comp.os.windows-10,comp.sys.ibm.pc.hardware.storage
VanguardLH[_2_]
external usenet poster
 
Posts: 1,453
Default Why is this folder so slow?

Yousuf Khan wrote:

I'll tell you what this folder is. It's actually my Thunderbird News
folder (exactly what I'm using to ask this question here), which exists
under the my User folder structure. The problem was discovered when I
started doing daily backups of my User folder and discovered that the
User folder was taking forever. After investigating it some, I figured
out that the problem was this particular substructure under News. Once I
excluded the News folder, backups finished 6 times faster! So I moved
the backups of the News folder to their own job, and let the rest of the
User folder get backed up separately. Before, you ask, I only backup the
News folder once a week, but it's still a pain in the ass watching it
take so long even once a week.

Some other background. When this particular backup is happening, it's
not the drives that are showing as busy, it's the CPU cores! 4 out of
the 8 cores on my FX-8300 are fluctuating between 50% to 100% busy,
while the other 4 are not that busy.

Yousuf Khan


As a test, disable your anti-virus software and run your TB data-only
backup job.

As another test, make sure to *exit* Thunderbird (check there are no
instances of TB in Task Manager's Processes tab), and check if the
backup job is just as slow.

Do you leave TB running all the time? Does the backup job run as a
scheduled event at a time after you would've unloaded TB, like you use
TB during the day (say 8AM to 11 PM), unload it when done, and you
schedule the backup job to run early morning (say 4 AM)?

VSS will encounter problems with databases that are not VSS aware.
Microsoft's SQL Server is VSS aware, but others are not. The
recommendation in backup programs, even those using VSS, for database
programs that are not VSS aware is to schedule their shutdown before the
backup, schedule the backup while the database program is down, and
restart the database program after the backup finishes. While this can
be done using Task Scheduler using event triggers (provided the database
program issues an event on shutdown), it's a pain to figure out the
script-like code you have to use to define for the trigger of the
scheduled event. There are schedulers that are more flexible that can
make their events dependent: task 3 runs only after task 2 ran and
returned good status which runs only after task 1 completed and returned
good status.

https://knowledgebase.macrium.com/di...ware+databases

I sincerely doubt Thunderbird provides its own VSS writer. What does
Tbird use to manage its message store? Isn't it SQLite? SQLite is not
a VSS-aware database program. In fact, it isn't a database program at
all. It's a library from which some program can call its functions (aka
methods). It would be up to the calling program to be VSS-aware, and I
doubt Mozilla ever added that to Tbird.

http://sqlite.1065341.n5.nabble.com/...r-td85887.html

I remember back when using MS Outlook with POP which stored its message
store in a PST file that backups would often skip that database. While
Outlook was running, its database couldn't be backed up because it
wasn't only in-use but also locked as a database. MS didn't provide a
VSS writer just for Outlook. Some users used batch files that would
kill Outlook, run the backup (to include Outlook's message store), and
reload Outlook after the backup finished. However, Outlook has no way
to gracefully unload it. There is no command-line switch for Outlook to
ask it to unload. You had to kill it, and that's always a bad way to
smash a program with open files since corruption can occur to the files.
Some backup programs worked around the problem by installing an
extension into Outlook that would exit it and start the backup program,
and the backup program would later restart Outlook. I'm sure there were
other workarounds. Since Outlook is a client, not a server, there
really was no need to leave it running 24x7, but a lot of users ran it
that way, so it available upon their return to their computer.

Not all programs that manage a database are VSS-aware. Usually the
easiest solution is to make sure the program using the database is not
running at the time of the backup job. Does Tbird have a command-line
switch that will unload the currently loaded instance(s) of Tbird?
Using taskkill.exe is abrupt and can result in file corruption. If
Tbird can be requested to gracefully shutdown, you could do that in a
script, run the backup job, and reload Tbird (if you can get scripts via
Powershell, VBscript, or batch to work in Reflect).

I doubt Tbird generates an event when it exits (i.e., you don't see
anything in Event Viewer). If it does, you can define a scheduled event
in Task Scheduler to run the backup job that triggers on the exit event
of Tbird.