USB Docking stations and network speed

Jan 31
2024

Unfortunately, nearly all notebook manufacturers have discontinued notebooks with dedicated docking connectors (Dell, HP, Lenovo) and Fujitsu has retires his clients from the European market.

As replacement, the notebook manufacturers are proposing universal docking stations using USB-C or Thunderbolt connectors. All these docking stations (until now I do not know any exception) have really slow network interfaces.

Most of our software packages store their data in DBF tables and therefore the network performance is an important thing. In the last years we have had many complaints from our customers regarding bad performance on I/O intensive operations done on notebooks.

Until now, we had only two solutions: connect the network cable to the internal port of the notebook (if there is one), or use a fast USB network adapter (better to use one with 2.5 Gbps like the StarTech US2GC30) directly on the notebook or even on the docking station. The latter shows clearly that the bottleneck is not the USB port on the notebook but something internal in the docking station.

When we talk about bad performance, we do not talk about 10% or 20% longer execution times, but about more than double the time, sometimes three times of the integrated NIC.

We have contacted some producers of docking stations and buyed some of their products, but they all had the same problem as the notebook manufacturers models: slow network performance.

The only exception we found until now was the Conceptronic model DONN22G – it was even a bit faster than the integrated NIC of your test notebook.

Our test notebook was a Fujitsu Liefbook U728, running on a 1 Gbps network against a Linux (Debian) server with Samba and a SSDs disks on a hardware RAID 1.

Addition April 2024: To our surprize, we now found also another docking station that works well and has also a reasonable cost: the Manhattan “USB-C PD 10-in-1 Dual Monitor 8K Docking Station”, model PD-714, part no. 130714. At the cost of about 100 Euro + VAT, this docking station not only has a fast nework port, but also 2 HDMI Ports (one supporting up to 8K, the other 4K), 85 W USB Power Delivery and a total of 6 USB ports, one of them USB-C 3.2 Gen 2.

3Ware/AMCC 9650SE and newer motherboards

May 04
2019

In the past, the 3Ware/AMCC RAID controllers were an good choice for Linux servers, and I have several of them workingin the field.

One of them failed recently and I tried to replace the machine, maintaining the RAID cards and the disks, but unfortunately the machine locked up at the “Loading Linux” message. With a Linux boot DVD the machine started, but showed a reset of the RAID controller and locked up afterwards.

Trying to replace the new server (a Fujitsu TX1310 M3) with an older PC hardware worked.

I have also tried to upgrade the BIOS of the controller with the newest available version, but this failed too.

So, if you have the need to use this controller in newer machines: don’t loose your time – it will not work.

This is a hardware related issue – I have encountered it with Debian 9 and RIPLinux 11.7, but other people had it also with CentOS.

Please see the following page for reference:

https://www.centos.org/forums/viewtopic.php?t=52231


The 1803 Update of Windows 10 and Samba

May 15
2018

After the update to Windows 10 Build 1803 machines could not more connect to the Oracle server when the application was started from a network share or a mapped network drive.

These problems were caused by the fact that applications started from a SMB v1 share could not more connect to any network service (file based access was ok).

The server was a Debian Wheezy Linux machine with Samba 3.6. Samba 3.6 is the first Samba version that supports SMB v2 connections, but unfortunately they are disabled by default. To enable them, you must add the following line to the Samba configuration file /etc/samba/smb.conf:

max protocol = SMB2

Restart Samba and your Windows client, and the connection will be SMBv2.
You can check this opening a PowerShell with administrative (elevated) rights and the following command:

get-smbConnection

Applications that will not work from a SMBv1 share include: email programs, SSH Clients (putty), curl, database clients, and any type of program that opens some network connection.

In the upgrade of another customer server I had a very unusual issue: the server was using a Sernet Samba version, and the upgrade from Debian Squeeze to Debian Wheezy removed this Samba version. A new installation of the Debian version could not find any users anymore.
Strangely, the Sernet Samba version had their user database in /etc/samba, and the Debian Samba version in /var/lib/samba. Stopping Samba and copying over these database files fixed the issue.

Slow initial connection on https connects

Nov 22
2017

Our most busy server sometimes showed long connection times after we changed the default protocol from http to https.

This server is running Apache 2.4.10 on Debian Wheezy, and the slow connection times manifested themselves after periods of higher than normal load, but far from being critical.

I have tried a lot of different things, like incrementing the number of Apache processes, limiting the number of concurrent outgoing mails (the server sends about 20.000 emails every day), and also adding more memory to the system – but nothing helped.

Unfortunately, http/2 is not available with this Apache version, and I don’t like to backport from a newer Debian version. The same is true for ALPN and NPN – both not available in the installed Apache version.

The solution was to enable OCSP stapling:

SSLUseStapling on
SSLStaplingCache shmcb:/tmp/stapling_cache(128000)

Now the maximum connection times are down to about 5 seconds in the most busy periods, instead of reaching 20 seconds and more. In times of normal load the connection times are below 0.1 seconds.

As test I can recommend the SSLLabs test by Qualys: https://www.ssllabs.com/ssltest/analyze.html

Debian 9 Stretch, PHP 7 and Microsoft SQL Server access

Nov 12
2017

Microsoft supports SQL Server access from Linux and PHP 7, but unfortunately not with Debian 9 Stretch, but only for Debian 8 (and Ubuntu 15.10, Ubuntu 16.10, Ubuntu 6.04, RedHat 7 and MacOS).

See https://docs.microsoft.com/en-us/sql/connect/php/installation-tutorial-linux-mac

I have tried to use the PDO Sybase drivers (package php7.0-sybase), but was not able to connect.

Then I found the page https://github.com/Microsoft/msphpsql/releases and have done the following:

pecl install sqlsrv-5.1.1preview
pecl install pdo_sqlsrv-5.1.1preview

The build failed until I installed the package unixodbc-dev
apt-get install unixodbc-dev

To enable the both modules in Apache2, I have done also the following:
cd /etc/php/7.0/mods-available
cp pdo_dblib.ini pdo_sqlsrv.ini
cp pdo_dblib.ini sqlsrv.ini

changed the contents of the files to list the appropriate -so file (pdo_sqlsrv.so and sqlsrv.so),
cd /etc/php/7.0/apache2/conf.d
ln -s /etc/php/7.0/mods-available/sqlsrv.ini 20-sqlsrv.ini
ln -s /etc/php/7.0/mods-available/pdo_sqlsrv.ini 20-pdo_sqlsrv.ini

and restarted Apache2.

Now, my test function returned that the ODBC driver was missing.
I have downloaded then the Debian 8 version and installed the driver and the tools:
wget https://packages.microsoft.com/debian/8/prod/pool/main/m/msodbcsql/msodbcsql_13.1.9.1-1_amd64.deb
wget https://packages.microsoft.com/debian/8/prod/pool/main/m/mssql-tools/mssql-tools_14.0.7.0-1_amd64.deb
apt-get install unixodbc
dpkg -i msodbcsql_13.1.9.1-1_amd64.deb
dpkg -i mssql-tools_14.0.7.0-1_amd64.deb

After this, I was able to connect to the SQL server and run a select statement.

$conn = new PDO("sqlsrv:Server=$myserverName;Database=$myDB", $myUser, $myPass);

Database Manager software: Navicat Premium Essentials

Jul 11
2017

In my daily work, I have to deal with several different databases. Until now, it were mostly Oracle, SQL Server and MySQL, but in the last time SQLite and PostgreSQL have been added to my list.

In the past I had used mostly DB Manager from DBTools software in Brasil, but the last release of this software is from the year 2010, so about 7 years old, and it does not work with the Oracle database I have to deal with.

Searching for a valid successor without spending too much money (I need 3 licenses as we are 3 developers in our company), I have found Navicat Premium Essentials by Premiumsoft Cybertech Ltd, and after a short trial period I have acquired the needed licenses, and was really happy with it.

Now they have released their next version, Navicat 12, and I have upgraded my licenses to the new version.

What I have to say: they are very serious. I have discovered two bugs in the new version and opened a support issue with them. In a relatively short period they answered and have acknowlegdet the bugs (the immediatly, for the other it needed a day more and more specifications from my).

They have several different versions of their database manager, but for my needs the Premium Essentials version is the right one, as it has support for all databases I need (for a short period I needed also Firebird support, not available in Navicat), and is relatively affordable.

Set initial date to WPF Calendar control

Mar 17
2017

In WPF, you can set the SelectedDate property to any DateTime value, but this value is not shown as initial date in the calendar control.

If you wish to set the initial date, you need to set the DisplayDate property.

If you use databinding, you can bind both values to the same property on the ViewModel, or to two different, what you like more. Of course in the latter case the initial value needs to be set to both properties.

Another suggestion: if you work with the Calendar control directly, you should embed it in a ViewBox control to have it adjusted when you resize your window.

Firebird specials in table structure for varchar and UTF-8

Nov 15
2016

In my Visual Objects applications based on DBFs I have a routine that checks the structure of the DBF tables, compares them with the structure that is required and adjusts the structure.

I’m now working on a similar functionality for my Firebird based .NET applications. To retrieve the list of the currently existing user tables, I’m using such a statement:

select rdb$relation_name as tablename from rdb$relations
where rdb$view_blr is null and 
(rdb$system_flag is null or rdb$system_flag = 0)

and to retrieve the actual structure of such a table I use the following statement:

select rf.rdb$field_position as fieldpos, 
TRIM(rf.rdb$field_name) as fieldname, 
f.rdb$field_type as fieldtype, 
f.rdb$field_length as fieldlen,
f.rdb$field_scale as fielddec, 
(f.rdb$null_flag = 1) OR (rf.rdb$null_flag = 1) as canbenull 
from rdb$relation_fields rf 
JOIN rdb$fields f ON f.rdb$field_name = rf.rdb$field_source 
WHERE upper( rf.rdb$relation_name ) = upper( 'mytable' ) 
order by rf.rdb$field_position

To have no limitations with foreign languages, I have opted to use the UTF-8 character set for all varchar columns.

And now I was very surprised: the select statement returned 4 times the actual field width: for a field defined as varchar(20) the query returned 80 as field length.

My conclusion is very simple: since every UTF-8 character can take up to 4 bytes, Firebird reserves 4 bytes for every character.

I have now found the following StackOwerflow article about this:
http://stackoverflow.com/questions/822837/firebird-utf8-varchar-size

Firebird 3.0, Embedded server and the .NET provider

Nov 15
2016

For local data, the embedded server of Firebird is very welcome because it does not needs any configuration.

With Firebird 2.5, a special DLL (fbembed.dll) was needed, but Firebird 3.0 has added this functionality into the standard fbclient.dll.
So, if using the embedded server of Firebird 3.0 instead of the one of Firebird 2.5, you need to specify this in the connection string. It is the best to use the ClientLibrary property of the FBConnectionStringBuilder (namespace FirebirdSql.Data.FirebirdClient).

The following files need to be put in your application directory (please make attention to use the correct bitness – 64 bit files for a 64 bit application and 32 bit files for a 32 bit application):
fbclient.dll
ib_util.dll
plugins\engine12.dll

Normally, you should NOT need to put a firebird.conf file in you application directory.

References:
http://stackoverflow.com/questions/37444411/unable-to-connect-firebird-3-0-embedded-version
http://firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-engine.html

XIDE: Starting without loading the plugins

May 26
2016

Specially for developing XIDE plugins there is a possibility to startup XIDE without loading the plugins:

– keep the shift key pressed while XIDE starts
– add a /noplugins switch to the command line

This functionality was added yesterday ( May 25, 2016 ). So if you need this and your XIDE version is older, ask the author for an update.