Difference between revisions of "Installing and using KDB / Kx"

From Define Wiki
Jump to navigation Jump to search
Line 52: Line 52:
  
 
q)
 
q)
 +
</pre>
 +
 +
To exit the q) shell use ```\\```
 +
<pre>
 +
q)\\
 +
[root@deploy-ext q]#
 
</pre>
 
</pre>

Revision as of 07:56, 21 May 2021

Installation

[root@deploy-ext kdb]# unzip l64.zip
Archive:  l64.zip
  inflating: l64/q                   
  inflating: q.k 

Copy over the license

[root@deploy-ext q]# pwd
/root/q
[root@deploy-ext q]# tree
.
├── kc.lic
├── l64
│   └── q
├── l64.zip
└── q.k

1 directory, 4 files

License was only for 16 cores - so we need to use numa to run

[root@deploy-ext kdb]# l64/q 
KDB+ 4.0 2021.04.26 Copyright (C) 1993-2021 Kx Systems
l64/ 40(16)core 128545MB root deploy-ext.dt.internal 192.168.10.1   david@petagene.com KOD #4176253

'licence error: cores

Using affinity to run Kx

# Check NUMA support 
[root@deploy-ext q]# grep NUMA=y /boot/config-`uname -r`
CONFIG_NUMA=y

# If NUMA is not enabled 
[root@deploy-ext q]# taskset -c 0,1 l64/q 
KDB+ 4.0 2021.04.26 Copyright (C) 1993-2021 Kx Systems
l64/ 2(16)core 128545MB root deploy-ext.dt.internal 192.168.10.1 EXPIRE 2022.05.17 david@petagene.com KOD #4176253

q)

# If NUMA is enabled 
[root@deploy-ext q]# echo 0 > /proc/sys/vm/zone_reclaim_mode
[root@deploy-ext q]# numactl --interleave=all --physcpubind=0,1,2 l64/q 
KDB+ 4.0 2021.04.26 Copyright (C) 1993-2021 Kx Systems
l64/ 3(16)core 128545MB root deploy-ext.dt.internal 192.168.10.1 EXPIRE 2022.05.17 david@petagene.com KOD #4176253

q)

To exit the q) shell use ```\\```

q)\\
[root@deploy-ext q]#