Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restore takes 25% more time vs 4.0.0 #7770

Closed
tonne1 opened this issue Sep 28, 2023 · 9 comments
Closed

restore takes 25% more time vs 4.0.0 #7770

tonne1 opened this issue Sep 28, 2023 · 9 comments

Comments

@tonne1
Copy link

tonne1 commented Sep 28, 2023

Noticed when upgrading from 4.0.0 to 4.0.3, 4.0.4 and 5.0.0 are affected too. Test case is a database with one big table. The size of the database is 3.3 GB:

Preparation, please adjust path and port as needed:

create database 'D:\temp\res.fdb' page_size 16384
user 'sysdba' password 'masterke'
default character set ISO8859_1;

create table bigone (
  F1 VARCHAR (1000),
  F2 VARCHAR (1000),
  F3 VARCHAR (1000),
  F4 VARCHAR (1000),
  F5 VARCHAR (1000),
  F6 VARCHAR (1000),
  F7 VARCHAR (1000),
  F8 VARCHAR (1000)
);

execute block
as
declare i int = 0;
declare n int = 15000000;
begin
  while (i < n) do
  begin
    insert into bigone values ('XXXX', 'XXXX', 'XXXX', 'XXXX', 'XXXX', 'XXXX', 'XXXX', 'XXXX');
    i = i + 1;
  end
end;
  1. backup res.fdb

  2. gbak -rep -page_size 16384 -se localhost/3054:service_mgr d:\temp\res.fbk d:\temp\res.fdb

Results:

FB  duration disk write  diff   comment

400 3:00     25           0     reference
403 3:49     20           +27%
404 3:44     20           +24%
500 3:34     13           +19%  ParallelWorkers = 1
500 0:55     52           -70%  ParallelWorkers = 6

duration is [min:sec],
disk write speed as observed in task manager is [MB/s], typical value, stabilizes after about one minute
diff is difference in duration vs 4.0.0

4.0.4.2993, 5.0.0.1215, the other two are official releases.

@hvlad
Copy link
Member

hvlad commented Sep 29, 2023

Confirmed.

hvlad added a commit that referenced this issue Oct 2, 2023
…atement.

While it is not direct fix for #7770 (restore takes 25% more time vs 4.0.0), it should improve performance in this case too.
@hvlad
Copy link
Member

hvlad commented Oct 2, 2023

@tonne1, could you check changes with next snapshot build of v4.0.4, please ?

@tonne1
Copy link
Author

tonne1 commented Oct 2, 2023

Thanks, tested with 4.0.4.2998, no noticable difference vs build 2993

@hvlad
Copy link
Member

hvlad commented Oct 2, 2023

Snapshot 4.0.4.2998 is older and doesn't contains patch, it will be available in build 4.0.4.2999.

Weird, looks like snapshots page contains old build. You may use CI build or wait for snapshots page update.

@hvlad
Copy link
Member

hvlad commented Oct 3, 2023

FYI: snapshots page is updated with build 4.0.4.2999

@tonne1
Copy link
Author

tonne1 commented Oct 3, 2023

Tested with build 4.0.4.2999, numbers are better:

FB duration disk write diff comment
400 3:00 25
404 3:26 22 +14% (was 24%)

hvlad added a commit that referenced this issue Oct 3, 2023
…atement.

While it is not direct fix for #7770 (restore takes 25% more time vs 4.0.0), it should improve performance in this case too.
hvlad added a commit that referenced this issue Oct 3, 2023
…atement.

While it is not direct fix for #7770 (restore takes 25% more time vs 4.0.0), it should improve performance in this case too.
@TommiPrami
Copy link
Contributor

TommiPrami commented Oct 4, 2023

Tested with build 4.0.4.2999 also, with our more than less real-world database, not huge (under 2GB).

4.0.3

Backup
27.56s
30.38s
28.47s

Restore
123.93s
122.42s
118.29s

4.0.4.2999

Backup
30.36s
36.73s
31.81s

Restore
112.81s
108.04s
120.13s

Almost 10% improvement, at the best (did not actually calculate the speedup)

Bacup slowdown could be, at least partly, to do with all the blobs are restored.

@hvlad
Copy link
Member

hvlad commented Oct 25, 2023

Please, check next snapshot build (one after 4.0.4.3002)

@tonne1
Copy link
Author

tonne1 commented Oct 28, 2023

Tested with build 4.0.4.3003 and 5.0.0.1254, numbers are excellent:

FB  duration disk write  diff   comment
400 3:00     25           0     reference
403 3:49     20           +27%
404 3:44     20           +24%  build 2993
404 3:26     22           +14%  build 2999
404 3:00     25           0%    build 3003  <--
500 3:34     13           +19%  build 1215 ParallelWorkers = 1 
500 0:55     52           -70%  build 1215 ParallelWorkers = 6 
500 2:49     17           - 6%  build 1254 ParallelWorkers = 1   <-- 
500 0:44     90           -76%  build 1254 ParallelWorkers = 6   <--

404 is back to normal and 500 is impressive! Thanks Vlad!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment