Spectre/Meltdown slowing down delphi service

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
rimes_dev
Posts: 1
Joined: Fri 08 Feb 2019 09:19

Spectre/Meltdown slowing down delphi service

Post by rimes_dev » Fri 08 Feb 2019 09:29

Hi,

I have a problem with the spectre/meltdown patch from windows (it got released somewhere around Q1 last year). When activated, my delphi REST service is being slowed down about 20-25 times (so if a request takes 1 second, with the activated patches its about 20 seconds). I have traced the slowdown down to the database connection. Somehow the translation from parameters, after they have all been set, to the sql text, takes really long and then the execution on the database itself takes a lot longer than usual. First I helped myself by cutting down the sql statement to couple of rows, and it got faster (so more rows mean a lot more time. Approximately its like, if you add one more row to an update/insert statement it takes 0.2-0.3 seconds more to process the transaction. As far as I saw it, select statements work fine). After I got the same issue on other requests, and the application is still in development, I turned of the patches, and everything got a lot faster. Now the administrator insists that the patches are being turned on, and the problem is there again.

The interesting thing is that when the server is run as a VCL application (with the same SQL Statements in the backend), everything works fine, but when run as a windows service, the slowdown is huge

I am using Delphi 10.2 Tokyo, and dbexpress 7.5.7 (running on windows server 2016)
If its of any help, I could also get the exact processor model (its some XEON E5). I guess its a combination of the processor + the patch thats causing this problem


Regards

Stellar
Devart Team
Posts: 496
Joined: Tue 03 Oct 2017 11:00

Re: Spectre/Meltdown slowing down delphi service

Post by Stellar » Fri 08 Feb 2019 14:35

The run of the application as a desktop application or as a Windows service has no effect on the work of dbExpress Driver for SQL Server. To investigate the problem, please provide us with a test example demonstrating the problem, as well as a script for creating tables.
You can send the sample using the contact form at our site: devart.com/company/contactform.html

Post Reply