tip

Integrate external git repository with its history

프로젝트 a 와 프로젝트 b 를 병렬로 진행하고 있었는데, 두개의 리포지토리를 합치고 싶어지는 경우가 있습니다. 예컨대 프로젝트 a 의 성격이 보다 범용이 되었고 프로젝트 b 는 프로젝트 a 를 위한 도구적 성격이 되는 경우가 있겠죠. a 프로젝트에 ‘b’ 디렉토리를 만들고 그 아래 기존 프로젝트 b 의 파일들을 위치하고 싶습니다. 하지만 기존 b 프로젝트의 git 히스토리들도 유지하고 싶습니다. 비슷한 사례로 리눅스 커널 메모리 모델 프로젝트는 별도의 리포지토리[1] 로 개발되었지만 리눅스 업스트림 리포지토리의 tools/ 디렉토리 아래로 머지[2] 되었는데, 이 때 기존 개발 히스토리를 유지했죠.

spec cpu2006 벤치마크 수정하기

경우에 따라서 SPEC CPU2006 의 벤치마크 중 일부의 소스코드를 수정하고 싶을 수 있습니다. 예를 들어 특정 벤치마크가 구체적으로 어떻게 동작하는지 알아보기 위해 디버깅 메세지를 추가하고자 할수도 있고, 코드 변경을 통해 성능을 높인다거나 해볼 수도 있겠죠. 그러나, SPEC CPU2006 은 엄정한 벤치마크 수트이기 때문에 소스코드는 물론, 소스코드를 사용하는 도구가 변경된 경우 에러 메세지를 내고 수행을 거부합니다. 수정된 소스코드로 얻어진 결과는 벤치마크 결과로 적합하지 않기 때문이죠. 때문에, 어쩔 수 없이 수정이 필요하면서도 기존의 수행 방법을 따르려면 이 에러를 내는 곳을 없애는 게 한가지 방법이 될 수 있습니다.

TPC-H on MariaDB (MySQL)

Benchmarks for Database can be roughly divided into two kinds, OLTP and OLAP[1]. One of the most popular OLTP benchamrks is TPC-C, while that of OLAP is TPC-H[2]. This post describes how you can run TPC-H against MariaDB. Environment Setup The versions of the OS and programs I used for writeup of this post are as below. Ubuntu 16.04.2 Server MariaDB 10.2.8 TPC-H toolkit 2.17.2 Automated Scripts I automated whole things I will describe below using scripts and uploaded the scripts to the Github: https://github.

Ubuntu 16.04 Server 위에 MariaDB 설치/사용하기

악의 조직 Oracle 에서 Sun 을 인수한 후 이어진 반 open source 적 행보에 MySQL 개발자는 MySQL 을 fork 해서 MariaDB 를 개발하고 있습니다. 저작권을 악용해 중요한 기능은 천천히 릴리즈 하거나 유료 라이센스로만 공개하기도 하는 Oracle 의 MySQL 과 달리 MariaDB 는 예전 MySQL 처럼 공개적으로 개발되고 있어 새롭고 진보적인 기능도 많이 있는 편인 것 같습니다. 이 글에서는 Ubuntu 16.04 서버에 MariaDB 를 소스코드부터 가져와서 설치하고 사용하는 간단한 사용법을 정리해 봅니다.

Golang 1.9 install on Fedora 26

현재 사용중인 랩탑에 설치한 OS 는 Fedora 24 였는데, 너무 오래되었고 지원도 얼마전 끝났기에[0] 이번에 Fedora 26 으로 새로 설치했습니다. 마침 go 언어도 1.9 가 최근에 릴리즈 되었기에 개인적으로 go 언어를 설치하는 방법을 기록해 둡니다. 여기선 소스 코드만 가지고 빌드, 설치하는 방법을 기록합니다. Get Source Code go 언어는 오픈소스입니다. 다음 커맨드를 통해 구글로부터 소스코드를 받아올 수 있습니다. $ git clone https://go.googlesource.com/go 기다리면 go/ 디렉토리에 소스코드가 딸려옵니다. golang 1.4 Build & Install go 언어를 빌드한다는 건 go 언어 컴파일러와 기본 라이브러리 등과 같은, go 언어로 짠 프로그램을 빌드하고 수행하는데 필요한 도구들을 빌드한다는 이야기입니다.

Parsec 3.0 설치 / 사용법

PARSEC 은 멀티쓰레드 프로그램들로 구성된 benchmark suite 입니다. 멀티쓰레드로 구성되어 있기 때문에 멀티코어 시스템에서의 multi core scalability 를 테스트 하기에도 적합합니다. 이 글에선 현재 최신 버전인 3.0 버전의 PARSEC 을 Ubuntu 16.04 server 에 설치하면서 겪는 문제의 해결법과 간단한 사용법을 정리해 봅니다. Toolbox for PARSEC 3.0 on Ubuntu Xenial 아래의 내용을 하나하나 읽어가면서 따라하는 것도 귀찮은 일입니다. 그래서 아래에서 설명하는, Ubuntu Xenial 에서 PARSEC 3.0 을 돌리기 위해 필요한 작업을 대부분 자동으로 해주는 도구들을 만들어 두었습니다.

원격 데스크탑의 clipboard 를 ssh 와 xclip 으로 복사해오기

여러개의 리눅스 데스크탑 PC 를 한 책상 위에서 사용하는 경우가 있다. 이 때, 한 PC 에서 Ctrl-C 해서 clipboard 에 복사한 내용을 다른쪽 PC 에서 Ctrl-V 로 붙여넣고 싶은 경우가 있다. 여러가지 해결책이 있겠으나, 다음과 같이 ssh 와 xclip 을 사용해서 해결할 수도 있다: $ ssh <username>@<remote host> 'DISPLAY=:0 xclip -o -selection clipboard' | \ xclip -i -selection clipboard 참고: http://askubuntu.com/questions/513442/can-two-pcs-with-ubuntu-share-the-clipboard-buffer

Install / execute spec cpu2006 benchmark

SPEC, which is a standard corporation for the benchmark[1], makes and shares various benchmark suites. SPEC CPU 2006[1] is one of those benchmark suites. It has made to measure performance of computation intensive workload and widely being used now. It has released v1.0 in 2006, 1.1 in 2008, and 1.2 in 2011. This post briefly describes the way to install and execute the SPEC CPU 2006 v1.1 on Ubuntu 16.04 servers.

Updating Google Chrome on Fedora 23

I am using Fedora 23 laptop and installed stable version Google Chrome from its official website [0]. In this case, just using Updates of Fedora Software program doesn’t update Chrome automatically. For the case, follow below commands to update your Chrome: $ sudo dnf update google-chrome-stable ... $ sudo killall chrome $ google-chrome-stable The second killall command is necessary because Chrome doesn’t kill its process by just cliking Close button. Or, you may reboot your computer but you wouldn’t like that.

Using arping to know ip-MAC mapping

You can use arping to know IP address to MAC address mapping of your local network. Usage is simple: arping [-AbDfhqUV] [-c count] [-w deadline] [-s source] -I interface destination For example, you may use the command as below: $ arping -I eth0 10.0.0.1 ARPING 10.0.0.1 from 10.0.0.2 eth0 Unicast reply from 10.0.0.1 [11:22:33:44:55:66] 0.123ms Unicast reply from 10.0.0.1 [11:22:33:44:55:66] 0.251ms ... Secret of the tool is ARP protocol [1]. To know the MAC address of the machine that has a specific IP address, IP protocol layer uses the protocol.