Tag Archives: Linux

SAP Sybase IQ SA CR 728597 / Linux Kernel direct i/o bug & huge pages

Last year, April -> October, I asked the question about IQ supporting Huge Pages on Linux. It was mentioned that under SA CR 728597 and Red Hat Bug 891857 that there was a bug in the Linux kernel handling of direct I/O while using transparent huge memory pages (a variant of Linux Huge memory pages).

CR 728597:
This problem is related to a possible bug in the transparent huge pages (THP) feature introduced in these operating system versions. Red Hat bug 891857 has been created to track this issue.

The problem can be triggered by calling an external environment, xp_cmdshell, or other procedure that causes a fork while other I/O is occurring. A known limitation with the Linux kernel limits the use of fork while doing O_DIRECT I/O operations. Essentially what can happen is that the data can come from or go to the wrong process’ memory after the fork. SQL Anywhere performs O_DIRECT I/O operations according to the documented safe usage. However, THP appears to cause further problems and the O_DIRECT I/O data comprising database page reads/writes appears to get lost.

http://scn.sap.com/thread/3338917 and http://froebe.net/blog/2013/06/17/does-anyone-have-any-details-on-redhat-linux-bug-891857/

Does anyone know the status of this ongoing FIVE year old issue?

http://scn.sap.com/thread/3505418

Share Button

Connect to Microsoft SQL Server (including Azure instances) from Linux (x86/x86-64) using ODBC and JDBC

Connecting to Microsoft SQL Server from Linux can be done through two different methods: ODBC and JDBC. Unfortunately, FreeTDS doesn’t connect to the newest versions of SQL Server unless you want to enable legacy connections.

The Microsoft JDBC Driver 4.0 for SQL Server, a Type 4 JDBC driver provides database connectivity through the standard JDBC application program interfaces (APIs) available in Java Platform, Enterprise Edition 5 and 6.

The Microsoft ODBC Driver (Linux) For SQL Server provides native connectivity from Windows to Microsoft SQL Server and Windows Azure SQL Database on Linux.

Share Button

FW: Matt Fischer’s LIMITING LXC MEMORY USAGE (aka How to limit the memory usage of Linux LXC containers and validate the memory limit)

I’ve been playing around with LXC over the past few weeks and one of the things I tried out was limiting the memory that the container is allowed to use. I didn’t plan on explaining all the ins-and-outs of LXC here, but a short description is that LXC provides a virtualizedish environment that is more than a chroot gives you, but less than a full-blown virtual machine. If you want more details, please check out stgraber’s blog post about LXC in 12.04.

Kernel Configuration
The first thing you need to do in order to limit memory usage for LXC is make sure your kernel is properly configured, you need the following flag enabled:

CONFIG_CGROUP_MEM_RES_CTLR=y

If you plan on also limiting swap space usage, you’ll also need:

CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y

These flags are enabled for me in my 12.10 kernel (3.5.0-22) and so presumably you’ll have them in 12.04.
Setting the Cap

First, I’m going to create my container. Following the instructions from stgraber’s blog post, and calling the container “memlimit”:

Read the entire post on Matt Fischer’s blog.

Share Button

Sybase SQL Server 11.0.3.3 for Linux – still going strong

Last night I helped a friend at a small company install, configure and tune Sybase SQL Server 11.0.3.3 for Linux using the same method as I used on HOWTO: INSTALLING AND RUNNING SAP / SYBASE SQL SERVER 11.0.3.3 ESD 6 ON UBUNTU LINUX USING KVM. No, I didn’t provide the software, they already had it.

There is something refreshing going to sybinit using ctrl-a to go to the next screen.  No X-Windows needed.  No Java.  Just a simple DBMS doing DBMS work. 

Share Button

HOWTO: Linux Samba protocol negotiation failed: NT_STATUS_INSUFFICIENT_RESOURCES – SOLVED! Windows XP 2k8 Win7 Win8 Win2012

The issue is the LanmanServer service runs out of memory. We need to boost that up:

On your Windows machine, fire up regedit (Start -> regedit) modify the following registry keys:
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache” from 0 to 1
HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size” from 1 to 3

The problem seems to manifest itself more frequently if you use your Windows box as a file server or a media server. If you can, restart the Windows box. If for some reason you can’t (e.g. your significant other is watching a video on the tv streaming from your Windows box), then you can do effectively the same by restarting the following services:

(Start -> cmd.exe) as administrator
>net stop LanmanServer /y
> net start LanmanServer
> net start Browser
> net start HomeGroupListener

Share Button