Firebird 3.0.6 - embedded. Change the disk to caching tables the first time you start program

36 vues
Accéder directement au premier message non lu

Stanislav Hruška

non lue,
4 oct. 2020, 06:44:4004/10/2020
à firebird-support
The first time you run it, the tables are cached to hard disk. The disk is determined by where the DB itself is located. For me D: \ ... - HDD (~ 3 min.)
I'd like to change that. I want to have caching on disk C - SSD (<10 sec)
I'm not doing well at all. Using firebird.conf (TempDirectories = c: \ temp) does not help.

Dimitry Sibiryakov

non lue,
4 oct. 2020, 06:46:5104/10/2020
à firebird...@googlegroups.com
04.10.2020 12:35, Stanislav Hruška wrote:
> The first time you run it, the tables are cached to hard disk.

Firebird itself does not do anything like that.

--
WBR, SD.

Mark Rotteveel

non lue,
4 oct. 2020, 06:47:1704/10/2020
à firebird...@googlegroups.com
Tables aren't 'cached' on disk, the TempDirectories setting only affects
temporary files, eg for sorting large result sets.

Tables are *stored* in the database file, so if your database file is on
D:\, then the tables are on D:\.

Mark
--
Mark Rotteveel

Stanislav Hruška

non lue,
4 oct. 2020, 06:57:5904/10/2020
à firebird-support
Um, that's what I was told.
Then please explain the behavior of the application. Delhpi 10.4.1 - FireDAC
            first run -      next
HDD    ~ 3 min      <10 sec
SSD     <10 sec     <10 sec

The main table has almost 3.5 million records. There is a link to other tables.

Dátum: nedeľa 4. októbra 2020, čas: 12:47:17 UTC+2, odosielateľ: ma...@lawinegevaar.nl

Mark Rotteveel

non lue,
4 oct. 2020, 06:59:3104/10/2020
à firebird...@googlegroups.com
On 04-10-2020 12:56, Stanislav Hruška wrote:
> Um, that's what I was told.
> Then please explain the behavior of the application. Delhpi 10.4.1 - FireDAC
>             first run -      next
> HDD    ~ 3 min      <10 sec
> SSD     <10 sec     <10 sec
>
> The main table has almost 3.5 million records. There is a link to other
> tables.

Told by whom about what? In any case, maybe you're thinking about the
filesystem cache which happens *in memory*.

Also, with those stats, where is the *database file*?

Mark
--
Mark Rotteveel

Dimitry Sibiryakov

non lue,
4 oct. 2020, 06:59:4904/10/2020
à firebird...@googlegroups.com
04.10.2020 12:56, Stanislav Hruška wrote:
> Then please explain the behavior of the application. Delhpi 10.4.1 - FireDAC

Use Resource Monitor and/or Process Monitor to find out what is really happening.

--
WBR, SD.

Stanislav Hruška

non lue,
4 oct. 2020, 07:07:3104/10/2020
à firebird-support
Told by whom about what?
About caching tables on disk.
The DB is always on the disk to which the specified times belong.
I'll try those monitors

Dátum: nedeľa 4. októbra 2020, čas: 12:59:49 UTC+2, odosielateľ: sd

Mark Rotteveel

non lue,
4 oct. 2020, 07:38:5104/10/2020
à firebird...@googlegroups.com
On 04-10-2020 13:07, Stanislav Hruška wrote:
> Told by whom about what?
> About caching tables on disk.

Think about: tables are saved in a database, on-disk. Why would the
tables then be cached again on disk?

> The DB is always on the disk to which the specified times belong.

So, if you want that performance, then the database needs to be on that
disk. This hasn't got to do with caching tables in a temporary directory
(as Firebird doesn't do that).

Mark
--
Mark Rotteveel

Stanislav Hruška

non lue,
4 oct. 2020, 07:46:4704/10/2020
à firebird-support
So I'll try differently:
Why does the application run for 3 min when first launched from Delhi.
Then always only 10 sec.
If I restart Delphi, it starts again for 3 min.
Because FireDAC?

Dátum: nedeľa 4. októbra 2020, čas: 13:38:51 UTC+2, odosielateľ: ma...@lawinegevaar.nl

Stanislav Hruška

non lue,
4 oct. 2020, 07:48:5804/10/2020
à firebird-support
Those 3 minutes are valid even if I run the exe directly

Dátum: nedeľa 4. októbra 2020, čas: 13:46:47 UTC+2, odosielateľ: Stanislav Hruška

Mark Rotteveel

non lue,
4 oct. 2020, 07:58:0104/10/2020
à firebird...@googlegroups.com
On 04-10-2020 13:46, Stanislav Hruška wrote:
> So I'll try differently:
> Why does the application run for 3 min when first launched from Delhi.
> Then always only 10 sec.
> If I restart Delphi, it starts again for 3 min.
> Because FireDAC?

It could be that Delphi is slow to load your application on HDD, or it
could have to do with the filesystem cache caching the database file *in
memory*, or with the Firebird page cache caching the most relevant
database pages *in memory*. Most of those caches are released when your
application exits, and then need to be repopulated when the application
starts again.

Mark
--
Mark Rotteveel
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message