Hello,
We ran our apps via a Terminal Service connection to
a VM hosted in a datacenter (Zen Server 6.5).
After upgrading this VM from Windows R2008 R2 to
Windows R2012 R2, we saw a BIG performance penalty,
but ONLY in Harbour or xHarbour apps !
In order to analyze the problem, we created a small Harbour PRG,
that reads a 100 MB file in two different languages (Harbour and C),
but using same algorithm:
- Using a "C" procedure (inside the PRG, #pragma command),
via C fread() function, and;
- Using a "Harbour" procedure (in the same the PRG),
via Harbour wrapped fread() function.
Of course, read task will run faster inside C code, then inside PRG code...
But how much difference is normal, how much is strange ?
a) In the mentioned server (in a VM, now with Windows R2012 R2), the results are:
fread() via C..: 1.47 seconds
fread() via PRG: 57.15 seconds
PRG fread() 38.90x slower then C fread()
b) In a new machine (Windows 7, not in a VM, Sata disk), the results are:
fread() via C..: 1.69 seconds
fread() via PRG: 5.23 seconds
PRG fread() 3.09x slower then C fread()
c) In an very old machine (Windows 7, not in a VM, Sata disk), the results are:
fread() via C..: 2.27 seconds
fread() via PRG: 31.23 seconds
PRG fread() 13.75x slower then C fread()
The test program is just one executable. Note that under C code, read performance
is good in all machines. But performance under PRG code is very bad in the
server (a), good in a new machine (b) and medium in a old machine (c).
Third-party benchmark utilities display very good performance marks in server (a).
The PRG test executable was built using a clean Harbour 3.0 install, directly from
distributed binaries. I attached the source code.
We are not understanding why so much variation in increased times
(from 3.09x to 38.90x). (same EXE, same call, same hardware, same moment...)
If possible, can someone compile the PRG and see if time difference was similar ?
Maybe this could not be a hardware performance problem, because
read under C code is ok. Maybe a Windows configuration issue ?
Maybe a Harbour compiler switch ?
Thanks in advance,
Marcos