[Fixed in 2.1.0] Config diff is slow in 2.0.x

Unimus support forum
Post Reply
petr
Posts: 6
Joined: Fri May 22, 2020 8:37 am

Mon Jun 01, 2020 2:15 pm

Hello,

when I try to do a config diff on FortiMail device in Unimus 2.0.x it takes around 30 seconds, but in unimus 1.10.4 it is almost instantaneous. The config has around 37000 lines(1092kB). If I try diff on FortiGate config, which has around 10000 lines(302kB), It takes less than 1 second. So I guess the problem is with bigger config files? It also makes the backup process much slower. Is there anything I can change in configuration to make it faster or is it a problem in version 2.0?
User avatar
Tomas
Posts: 1010
Joined: Sat Jun 25, 2016 12:33 pm

Tue Jun 02, 2020 1:33 pm

Hi,

Confirming this as a performance problem with large backup diffs in 2.0.0 / 2.0.1.
We are looking into this and will fix it in either 2.0.2 or 2.0.3 at latest.
petr
Posts: 6
Joined: Fri May 22, 2020 8:37 am

Mon Jul 27, 2020 8:48 am

Hi,

I have seen this in 2.0.3-Beta2 changelog:
- Improved performance of diff generation - specially visible on large diffs

So I thought I would try it and see if it is faster. But even in this version the diff still takes about 30s to make. So it looks like nothing changed.
petr
Posts: 6
Joined: Fri May 22, 2020 8:37 am

Mon Aug 17, 2020 6:53 am

Hi,

after trying 2.0.4, I have to say, that unfortunately nothing changed and the slow config diff is still happening...
User avatar
Tomas
Posts: 1010
Joined: Sat Jun 25, 2016 12:33 pm

Wed Sep 08, 2021 7:09 pm

We have found one additional case where our diffing logic could be slow - on very large "one-sided" diffs. For example, if many lines (100s) changed in the newer revision as compared to an old revision.

We have optimized this part of the diffing code, and this should now behave much better.
petr
Posts: 6
Joined: Fri May 22, 2020 8:37 am

Mon Sep 13, 2021 8:29 am

Well after trying the diff in 2.1.2 unfortunately nothing has changed. The fortimail diff still takes about a minute while using 100% CPU. What I found out is, that it depends on how many certificates are stored in the config file. For each certificate in the config file the diff takes much longer.
Vik@Unimus
Posts: 11
Joined: Thu Aug 05, 2021 6:35 pm

Mon Sep 13, 2021 4:03 pm

Thank you for letting us know. I have created an internal ticket with the current situation summary, so that we can go from there. We are working on another algorithm, which might help, but I don't have an ETA I could offer right now.
I spoke with our developer who was troubleshooting the issue with you back in January and he mentioned we couldn't replicate the same CPU usage numbers as you, thus I would like to also ask what CPU you are running, so that we have a better idea what HW is causing 100% load during processing diffs.
Post Reply