Self order system(1) intro. to React

1. Introduction I try to develop self order system of Japanese Monjayaki shop. 2. Prerequities OS: Windows10UI framework: React 17(using create-react-app) and Material UI 4.11 3. Goal of this article The goal is to create the followings.(1) Navigation menu as toggle button(2) Language menu which switch display language 4. Installing React and Material UI (1) [...]

Installing VirtualBox on CentOS7

1. Introduction I installed a virtualization software VirtualBox which is based on hosted hypervisor. 2. Installing libSDL is necessary to install VirtualBox. libSDL is a cross-platform development library designed to provide low level access to multimedia. mkdir ./virtualbox cd ./virtualbox wget sudo yum install libSDL* sudo rpm -ivh ./VirtualBox-6.1-6.1.16_140961_el7-1.x86_64.rpm 2. References [1] Oracle VM [...]

A little experiment for CPU vs GPU using CUDA

1. Introduction I am a begineer of GPGPU. For performance comparison of CPU and GPU I did a little experiment using CUDA Toolkit. 2. Prerequities GPU: GeForce GTX 1060 6GB *CPU: AMD Ryzen 7 3700X 8-Core ProcessorOS: CentOS7.7CUDA: CUDA11.2Programing Language: C language* I bought this GPU according to [1] 3. Installing CUDA (1) Install CUDA11.2 [...]

SIMD sample code using AVX

1. Setup OS: CentOS7CPU: Ryzen 7 3700XMemory: TEAM DDR4 3200Mhz PC4-25600 32GBx 4x 2. Source (1) no_simd.c which multiple two vectors without SIMD #include <stdio.h> #include <stdlib.h> #include <time.h> void normal_mul(long long vec_len, float *ret, const float *v1, const float *v2){ for(long long elem_idx = 0; elem_idx < vec_len; elem_idx++) ret[elem_idx] = v1[elem_idx] * v2[elem_idx]; [...]

Using PostgreSQL logical replication on Docker

1. Prereuities OS: CentOS7PostgreSQL: PostgreSQL13.0Docker version 20.10 2. What I want to set up Publisher: container postgres13-server1, database testlrep, replication user repuser, table t1Subscriber: container postgres13-server2, database testlrep, table t1 3. Creating Docker containers (1) Install Docker and Docker images of PostgreSQL13 according to e.g. [1] (2) Creating Docker containers by the following commands docker [...]

Using PostgreSQL on Docker

1. Prerequities OS: CentOS7PostgreSQL: PostgreSQL13Docker version 20.10 2. Setup Docker (1) Install docker engine performing the following commands sudo yum install -y yum-utils sudo yum-config-manager --add-repo sudo yum makecache fast sudo yum install docker-ce systemctl enable docker (2) Check whether docker engine runs sample container or not docker run hello-world docker stop hello-world 3. [...]

LLVM JIT sample code

1. Introduction I wrote and run LLVM JIT sample program by refering to [1] and the LLVM official page. 2. Prerequities clang: version 5.0.1llvm: version 5.0.1* I installed the above softwares according to [1]implementation language: C language 3. Sample Code itself This program (i)create LLVM IR(Intermidiate Representation) program which multiples two values.(ii) Call (i) IR [...]

Installing Apache Spark from source

1. Introduction I will show how to intall Apache Spark3.0.1 from source. 2. Install procedure (1) Install Java8 sudo yum install java-1.8.0-openjdksudo yum install java-1.8.0-openjdk-devel (2) Install Maven3.6.3 which is a Java build tool wget tar xf ./apache-maven-3.6.3-bin.tar.gz -C /optsudo ln -s /opt/apache-maven-3.6.3 /opt/maven (3) Set environment variable for mavensudo vi /etc/profile.d/ JAVA_HOME=/usr/lib/jvm/jre-openjdkexport M2_HOME=/opt/mavenexport [...]

Paper reading memo: Microarchitectural Analysis of OLAP: Limitations and Opportunities

1. Memo This paper shows experimental results on columnstore performance in some settings. This paper focuses on utilization efficiency of CPU. The authors analyze effects of some techniques related to CPU such as Prediction*, SIMD, Prefetch, Turbo boost and Hyper Threading. This paper shows the effect when performing multi-thread processing is quite smaller than one [...]

Looking up PostgreSQL internal related to performance of inserting big data

1. Introduction Response time of inserting big data(e.g 10GB~) is often longer than one of writing that data into storage. I looked up the cause of this difference by reading PostgreSQL source and performing simple experiment. 2. Prerequities Version of PostgreSQL: PostgreSQL13.0Experimental Setting: CentOS7, PC spec: Ryzen 7 3700X 3.6GHz 8Cores, 128GB memory, SSD M.2 [...]

How to build and debug PostgreSQL using MinGW

1. Install PostgreSQL using MSYS2 and MinGW (1) Download MSYS2 installer from the following link and install along with the installer Add path to D:\msys2-64\mingw64\bin. (3) Start MSYS2 by running the following command in command prompt D:\msys2-64\msys2_shell.cmd -mingw64 (4) Install build tools and debug tool by running the following commands in MSYS2 pacman -Syupacman --needed [...]

How to find operators accelarated by JIT in PostgreSQL

1. Introduction PostgreSQL can apply Just-in-time(JIT) compilation to some operations to convert general purpose code to native code. So PostgreSQL JIT can acclarate CPU-bound query. 2. What I looked up (1) How to use PostgreSQL JIT (2) Effect of PostgreSQL JIT(3) How to find operators accelarated by PostgreSQL JIT 3. Prerequisites Version of PostgreSQL: PostgreSQL13.0OS: [...]

How to do windows debugging Elasticsearch using Intellij IDEA

ElasticSearch is implemented in Java language. So, we need build and debug tools in Java language. I show build and debug procedures using Java build tool Gradle and Java integrated development environment Intellij IDEA. 1. Prerequisites Version of Elasticsearch: Elasticsearch 7.10 Target Machine and Host Machine: Windows10(same machine) 2. Building Elasticsearch Installi Gradle which is [...]

Effect of PostgreSQL buffer cache for read-only query for large data in PostgreSQL

1. Introduction In OLAP(Online Analytical Processing) workload, PostgreSQL server often reads large data from one table. So buffer cache for table containing large data is effective. In this short article, I show what I found on effect of buffer cache for accelarating query which reads large data from one table in PostgreSQL. 2. Prerequisites Version [...]

How to do linux debugging PostgreSQL remotely using Visual Studio Code

1. Prerequisites Version of PostgreSQL: PostgreSQL13 Target Machine: CentOS7 Host Machine: Windows10 2. Preparation in target machine Hereinafter we assume your username is postgres. Perform the follwing steps in target machine according to [1] (1) Download sources of PostgreSQL from official website and change directory wget -xzvf ./postgresql-13.0.tar.gzcd ./postgresql-13.0 (2) Install optional softwares as [...]

How to find limits of GUC parameter in PostgreSQL

1. Introduction PostgreSQL has many configuration parameters which control server behavior, so called GUC parameter. For example, work_mem control max amount of memory which is used postgres server when hash join, etc. are executed. There are no description upper limit or lower limit of some GUC parameters in PostgreSQL official document. I know there are [...]

How to debug InfluxDB remotely using Visual Studio Code

InfluxDB is implemented in Go language. So, we need build and debug tools in Go language. 1. Prerequisites Version of InfluxDB: InfluxDB 2.0 Target Machine: CentOS7 Host Machine: Windows10 2. Preparation in taget machine Perform the follwing steps in target machine (1) Install gvm(go version manager) bash < <(curl -s -S -L (2) Install [...]