The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

Archive for July, 2021

Some OmniThreadLibrary notes and links

Posted by jpluimers on 2021/07/14

For my link archive:

IOmniTimedTask and the Timed task name

You create a reference like this:

  TimedTask := Parallel.TimedTask.Execute(
    procedure(const task: IOmniTask)
    begin
      // ...
    end);

In the background, Parallel.TimedTask calls TOmniTimedTask.Create() which calls CreateTask(TOmniTimedTaskWorker.Create(), 'Timed task').Unobserved.Run

The problem is that TOmniTimedTaskWorker is private to the OtlParallel unit, which means you cannot take that call out without also copying that class.

There might be a workaround which I need to research based on the Apply method of IOmniTaskConfig, maybe through Parallel.ApplyConfig. These links might help:

–jeroen

Read the rest of this entry »

Posted in Delphi, Development, Multi-Threading / Concurrency, Software Development | Leave a Comment »

@isotopp: How fast is MySQL? I was casually operating under the impression, that a typical query resolution time is ~3ms. Turns out I was off 1-2 orders of magnitude…

Posted by jpluimers on 2021/07/13

Configured properly, even across network (see the answers in the Twitter thread below).

[WayBack] Thread by @isotopp: “How fast is MySQL? I was casually operating under the impression, that a typical query resolution time is ~3ms. Turns out I was off one or e […]”

How fast is MySQL?

I was casually operating under the impression, that a typical query resolution time is ~3ms.

Turns out I was off one or even two orders of magnitude.

A “select version()” type of nonquery is handled in around 20Β΅s.
A typical query in a point-query or BKA environment (where id = const, … where id in (c1, c2, …)) is typically handled in 350Β΅s.

This is based on looking at

select event_name,
AVG_TIMER_WAIT/1000000 as avg_us, max_timer_wait/1000000 as max_us, min_timer_wait/1000000 as min_us from performance_schema.events_statements_summary_global_by_event_name
where event_name = ‘statement/sql/select’;

| event_name | avg_us | max_us | min_us |
+———————-+———-+———–+———+
| statement/sql/select | 336.4440 | 2218.0450 | 36.4460 |
for about any of our servers with that kind of workload that I have been looking at.
This is obviously answered mostly from the buffer pool, because if you look at storage latencies, what you see here is that MySQL is in the same ballpark as NVME or SSD storage latencies (within 2x).
TL;DR: MySQL is fucking fast, and I had no idea how to quantify fucking fast before I looked into P_S

Read the rest of this entry »

Posted in Database Development, Development, MySQL, Software Development | Leave a Comment »

Chromium Embedded Framework – some links

Posted by jpluimers on 2021/07/13

For my link archive:

–jeroen

Read the rest of this entry »

Posted in .NET, Delphi, Development, Software Development | Leave a Comment »

Delphi Tokyo binary BPLs not finding “@System@Net@Httpclient@Win@TCertificateStore@$bcctr$qqrv” means you likely have Delphi 10.2.2 installed

Posted by jpluimers on 2021/07/13

If you get errors loading BPLs that indicate this method cannot be found: “@System@Net@Httpclient@Win@TCertificateStore@$bcctr$qqrv” then it is likely you run Delphi 10.2.2.

Upgrade to Delphi 10.2.3 to resolve this problem.

This happens for instance with binary versions of these below libraries.

They cannot help, as Embarcadero removed the TCertificateStore class (present in Delphi 10.1.2) in 10.2.0, then re-added it in 10.2.3.

 

Libraries that I bumped into that were affected:

Note that some reports talk about “@System@Net@Httpclient@Win@TCertificateStore@$bcdtr$qqrv” in stead ofΒ “@System@Net@Httpclient@Win@TCertificateStore@$bcctr$qqrv“. I am not sure what causes this discrepancy yet.

–jeroen

Posted in Delphi, Delphi 10.2 Tokyo (Godzilla), Development, Software Development | Leave a Comment »

Microsoft Action Pack links

Posted by jpluimers on 2021/07/12

For my link archive:

All via [WayBack] Microsoft blijft gratis Internal Usage Rights-programma aanbieden na ophef – IT Pro – Nieuws – Tweakers

–jeroen

Posted in Power User, Windows | Leave a Comment »

Detailed specifications – ThinkPad T510, T510i, W510 – NL

Posted by jpluimers on 2021/07/12

For my link archive: [WayBack] Detailed specifications – ThinkPad T510, T510i, W510 – NL

Related:

Vaguely related:

–jeroen

Posted in Hardware, Power User, T510, ThinkPad | Leave a Comment »

Some notes for future research: ovftool on ESXi

Posted by jpluimers on 2021/07/12

One of the things you cannot do easily is deploy ofv from an ESXi data store to an ESXi data store using ESXi 6.7 or higher using the web client.

Some notes that might help me further on this (for now I have worked around doing this by deploying from a Windows machine)

The ESXi 6.5 non-web client could do this easily [WayBack] ESXi 6.5 Deploy ova from Datastore |VMware Communities

–jeroen

Posted in ESXi6.7, Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »

Automatically shutting down an ESXi 6.7+ server from a CyberPower UPS using the PowerPanel Business Edition 4.x

Posted by jpluimers on 2021/07/09

Unlike the name PowerPanel Business Edition, this is a free tool. It allows you to manage your CyberPower UPS and to shutdown various systems, including an ESXi host.

It took CyberPower from version 3.3 to version 4.0 of the PowerPanel software to support ESXi 6.7. Reason was that VMware ESXi 6.5 was the latest version supporting vMA:

Below the steps to get PowerPanel 4.x up and running on ESXi 6.7+.

First of all, you have to ensure your CyberPower is connected to ESXi via USB.

Then you need to download and install the CyberPower virtual appliance “PowerPanel Business”

When the appliance runs, you have to virtually plugin the USB.

Finally configure the virtual appliance.

Read the rest of this entry »

Posted in CP1500EPFCLCD, CyberPower, ESXi6.5, ESXi6.7, Power User, UPS, Virtualization, VMware, VMware ESXi | Leave a Comment »

If you think everyone has such an organised life, and you feel so lost

Posted by jpluimers on 2021/07/09

Deelnemer in workshop: het lijkt wel alsof iedereen gewoon precies weet waar die mee bezig is en ik doe maar wat.

Ik aan andere deelnemers: wie van jullie klooit ook gewoon maar wat aan???

Iedereen (including me):

It does not translate well into English (though good translations are welcome), but comes down to this:

Workshop participant: it feels like everybody knows what they are doing, and I just try and try and try.

Me to all participants: who is doing trial-and-error?

Everybody (including me): raises hand.

Which basically is my life in one sentence.

I’m autodidact. I have virtually taught myself most things I know to date by just doing them and trying to solve the problems that came on my path, reaching out to the interwebs (and previously: books, magazines, mailing lists, word of mouth) whenever got really stuck.

Via: [WayBack] 𝕋𝕖𝕀𝕀𝕒 = π•„π•’π•œπ•šπ•Ÿπ•˜ π•Šπ•–π•Ÿπ•€π•– on Twitter: β€œπŸ˜ High five!!! Welkom bij de club!… ”.

–jeroen

Read the rest of this entry »

Posted in LifeHacker | Leave a Comment »

Obtaining system information from SMB – Nmap: Network Exploration and Security Auditing Cookbook – Second Edition

Posted by jpluimers on 2021/07/09

Based on

This scans the 192.168.1.0/24Β network for SMB capable machines, and extracts information from them:

nmap -p139,445 --script smb-os-discovery 192.168.1.0/24

Note that experimenting this, I found out that nmap is also available on Chocolatey: [WayBack] Chocolatey Gallery | Nmap 7.70 (heck, since 2016, no less!).

I was hoping I wrote a little batch file around this, called find-smb-hosts.on.192.168.1.network.bat, because net view is working not so well on Windows 10 any more, but that failed, so here is the batch file:

@echo off
:: only works from older versions than Windows 10
:: the delay is caused by the "net view" scanning the network
:: the first for calls ping with the hostname
:: the second for gets the IP and hostname without waiting for a ping result
for /f "usebackq tokens=1* delims=\ " %%m in (`net view ^| findstr "\\"`) do (
  for /f "usebackq tokens=2,3 delims=[] " %%h in (`ping -4 %%m -n 1 -w 1 ^| grep Pinging`) do (
    echo %%i    %%h
  )
)
goto :eof

:: output of the first for without filtering (no starting newline):
:: Server Name            Remark
::
:: -------------------------------------------------------------------------------
:: \\REVUE                Samba 4.7.3-git.30.54c196e5d35SUSE-oS15.5-x86_64
:: \\VCS-CI
:: The command completed successfully.

:: output of the second for without filtering (including the starting newline):
::
:: Pinging revue [192.168.1.62] with 32 bytes of data:
:: Reply from 192.168.1.62: bytes=32 time<1ms TTL=64
::
:: Ping statistics for 192.168.1.62:
::     Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
:: Approximate round trip times in milli-seconds:
::     Minimum = 0ms, Maximum = 0ms, Average = 0ms

The above batch file delivered many more results than this line:

nmap -p139,445 --script smb-os-discovery 192.168.71.1/24 | grep -w "\(report\|Computer name\)"

–jeroen

Posted in *nix, *nix-tools, nmap, Power User | Leave a Comment »