Now it is obvious that ^realglobal has 11.3 times the size of ^testglobal
while your ^testglobal seems to have all blocks in buffers in memory
this is rather unlikely for ^realglobal.
So repeated reloading of blocks from disk seems to cause the delay
If you have the chance to double or triple your global buffers
you most likely may see improved processing of your $O()

Follow up to @Dmitry Maslennikov:
Error on IRIS side:  ACCESS DENIED  ODBC can't connect ===> timeout
Why  ACCESS DENIED ? 
The most likely cause

  • you run multiple ODBC connections in parallel
  • you use the same fixed USER for access to IRIS
  • maximum license slots by user is ~25
  • once you pass the limit your 25 slots get converted to 25 single licenses
  • any further connection consumes a full license 
  • until you run out of available licenses ==> ACCESS DENIED
  • you can get out of that trap only if ALL connections of that user are closed 

You can avoid this by

  • limiting your ODBC connections below 24
  • or run your ODBC access in  serial mode
  • or use multiple users for access with limit <24

Hi @Vivian Lee !
I think you had no chance to see the problem in docs
You mentioned 
a custom class that extends %Text.English
this might be the cause of your problem.
The class is not visible in normal class reference (don't ask me why) 

Default %Text.English has a Parameter  NOISEWORDS100 =
"the of and a to in is you that it he for was on are as with his they at be this from I have or by one had not but what all were when we there can an your which their said if do will each about how up out them then she many some so these would other into has more her two like him see time could no make than first been its who now my made over did down only way find use may long little very after called just where most know get through back";

So you might be affected by these NOISEWORDS.
I failed to find any useful public documentation on this parameter and also %Text.Text is not too useful

#1 is correct

Your calculation #2 is seriously wrong.
reason
reading documentation you see
dformat -2 

$ZDATETIME returns an integer specifying the count of seconds from a platform-specific origin date/time. This is the value returned by the time() library function, as defined in the ISO C Programming Language Standard. For example, on POSIX-compliant systems this value is the count of seconds from January 1, 1970 00:00:00 UTC

And that's the mistake:
Your BirthDate is obviously considered as  LOCAL time
And therefore the difference you see reflects the time offset of your machine to UTC

-19800 sec => -5.5 hrs
system variable $ZTZ will show your offset to UTC in minutes  => -330
my guess: your machine is running at local time in India

 

for $ZTDH:
https://docs.intersystems.com/iris20231/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_fzdatetimeh
for $ZDT:
https://docs.intersystems.com/iris20231/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_fzdatetime

USER>r x
1997-08-09 10:38:39.700000000
USER>w $ZDTH(x,3,,9)
57199,38319.7
USER>w $zdt($ZDTH(x,3,,9),3,7)
1997-08-09T08:38:39Z
USER>w $zdt($ZDTH(x,3,,9),3,7,9)
1997-08-09T08:38:39.700000000Z
USER>

Most important:: you run on x86-64 if Windows or Red Hat is not important to your CBK
If you still have access check the size of the original CACHE.DAT. 
Check also the standard collation of the original DB to avoid unexpected surprise
To my experience, there should be no difference for backups between C1017 and C2018 (the latest)