ホスティングサービスにおいて,仮想ホスト単位で権限を分離するためには,Web サーバ上のアクセス制御である suEXEC 等を利用する.しかし,既存の Web サーバにおけるアクセス制御方式は,プロセスの生成,破棄が必要となり,パフォーマンスが低く,Web API のような動的コンテンツに適していない.また,インタプリタやプログラム実行方式別に複数用意されており,システム開発者が扱いにくい.そこで,本稿では,コンテンツ処理時にサーバプロセス上で新規スレッドを生成し,スレッドで権限分離を行った上で,スレッド経由でコンテンツの処理を行うアクセス制御手法 “mod_process_security” を提案する.この手法は,高速に動作し,かつ,煩雑になっている Web サーバ上のアクセス制御手法を統一することで,システム開発者が扱いやすくなる.実装は,広く使われている Linux と Apache HTTP Server に対して Apache モジュールとして組み込む形式をとった.
ホスティングサービスにおいて,仮想ホスト単位で権限を分離するためには,Web サーバ上のアクセス制御である suEXEC 等を利用する.しかし,既存の Web サーバにおけるアクセス制御方式は,プロセスの生成,破棄が必要となり,パフォーマンスが低く,Web API のような動的コンテンツに適していない.また,インタプリタやプログラム実行方式別に複数用意されており,システム開発者が扱いにくい.そこで,本稿では,コンテンツ処理時にサーバプロセス上で新規スレッドを生成し,スレッドで権限分離を行った上で,スレッド経由でコンテンツの処理を行うアクセス制御手法 “mod_process_security” を提案する.この手法は,高速に動作し,かつ,煩雑になっている Web サーバ上のアクセス制御手法を統一することで,システム開発者が扱いやすくなる.実装は,広く使われている Linux と Apache HTTP Server に対して Apache モジュールとして組み込む形式をとった.
VMware vForum/VSS2013にて発表されたNetAppセッションコンテンツNetApp Japan
VMware Software defined DC の主要コンポーネントとしてVMwareにより発表されたSDS(Software Defined Storage) は仮想化環境においてボトルネックになりがちなストレージ関連機能を強化する目的で開発されるコンセプトですが、ネットアップではそれら機能をストレージのレイヤですでに実装しています。いますぐ活用可能な「ネットアップのSDS」について解説します
This document discusses using HyperLogLog (HLL) to estimate cardinality for count(distinct) queries in PostgreSQL.
HLL is an algorithm that uses constant memory to estimate the number of unique elements in a large set. It works by mapping elements to registers in a bitmap and tracking the number of leading zeros in each hash value. The harmonic mean of these counts is used to estimate cardinality.
PG-Strom implements HLL in PostgreSQL to enable fast count(distinct) queries on GPUs. On a table with 60 million rows and 87GB in size, HLL estimated the distinct count within 0.3% accuracy in just 9 seconds, over 40x faster than the regular count(distinct).
PG-Strom is an extension of PostgreSQL that utilizes GPUs and NVMe SSDs to enable terabyte-scale data processing and in-database analytics. It features SSD-to-GPU Direct SQL, which loads data directly from NVMe SSDs to GPUs using RDMA, bypassing CPU and RAM. This improves query performance by reducing I/O traffic over the PCIe bus. PG-Strom also uses Apache Arrow columnar storage format to further boost performance by transferring only referenced columns and enabling vector processing on GPUs. Benchmark results show PG-Strom can process over a billion rows per second on a simple 1U server configuration with an NVIDIA GPU and multiple NVMe SSDs.
This document provides an introduction to HeteroDB, Inc. and its chief architect, KaiGai Kohei. It discusses PG-Strom, an open source PostgreSQL extension developed by HeteroDB for high performance data processing using heterogeneous architectures like GPUs. PG-Strom uses techniques like SSD-to-GPU direct data transfer and a columnar data store to accelerate analytics and reporting workloads on terabyte-scale log data using GPUs and NVMe SSDs. Benchmark results show PG-Strom can process terabyte workloads at throughput nearing the hardware limit of the storage and network infrastructure.
1. Memcached + SELinux engine
OSS開発勉強会-06
KaiGai Kohei (@kkaigai)
<kaigai@kaigai.gr.jp>
OSS Development Study Meeting-06 1
2. Memcachedの特徴
Key-Valueストア
<Key>に対応する<Value>を保存/取得するだけの機能
トランザクション、検索式、型定義...など無い! 速さこそ正義
分散システム
Memcachedサーバ自体に一切の分散機能は無い
ライブラリがKey値に応じたMemcachedサーバを選択して接続
memcached プロトコル
テキストベースのシンプルなプロトコル
http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt
多くの互換Key-Valueストア
Tokyo Tyrant, Repocached, Flared, KumoFS, ...
OSS Development Study Meeting-06 2
3. Memcachedシステムイメージ
Web-Server
User
Web-Apps PostgreSQL
ライブラリが接続先の
ライブラリが接続先の
Memcachedサーバを選択
Memcachedサーバを選択 libmemcached
Memcached
個々のMemcachedサーバは
個々のMemcachedサーバは
互いに独立にKey-Valueペアを
互いに独立にKey-Valueペアを
格納する
格納する
OSS Development Study Meeting-06 3
4. Memcached 内部構造
GET aaa get_item()
Key-Value
‘xyzxyz’ プロトコル処理部 hash_item * ストレージ
Key-Value
ストレージ
libevent with
New Feature
プロトコル解析部
Key-Valueストレージ
これ、Key-Valueストレージの部分を
モジュール化できるよね?
OSS Development Study Meeting-06 4
5. Memcached Engine (1/2)
Engine Interface v1
次期メジャーバージョン(v1.6.x系)の新機能
typedef struct engine_interface_v1 {
:
/**
* Retrieve an item.
*
* @param handle the engine handle
* @param cookie The cookie provided by the frontend
* @param item output variable that will receive the located item
* @param key the key to look up
* @param nkey the length of the key
* @param vbucket the virtual bucket id
* こんな感じでInterfaceが
こんな感じでInterfaceが
* @return ENGINE_SUCCESS if all goes well 定義されている
定義されている
*/
ENGINE_ERROR_CODE (*get)(ENGINE_HANDLE* handle,
const void* cookie,
item** item,
const void* key,
const int nkey,
uint16_t vbucket);
OSS Development Study Meeting-06 5
8. Memcached and Security
(3) Not run as root
(3) Not run as root
Memcached
(2) SASL auth,
(2) SASL auth, (1) Firewalling,
ififneeded Web Apps (1) Firewalling,
needed always
always
Web Server
できる事はほとんど何もない
絶対に外部ネットワークから接続可能にしちゃダメ
一応、SASL認証で接続の可否を決める事はできる
あと、root権限で走らせてはならない
Memcached Security; by Dustin Sallings
http://dustin.github.com/2010/08/08/memcached-security.html
OSS Development Study Meeting-06 8
9. SELinuxによるアクセス制御
“機密” 情報は、どこに格納
SELinux
Security しても“機密”情報として扱う
Policy
Filesystem
Networks
classified unclassified
information information
memcached RDBMS
domain of inter process domain of
classified processes communication channels unclassified processes
OSS Development Study Meeting-06 9
16. selinux.c
アクセス制御を行う関数群
interface.c 内の各メソッドから呼び出され、
SELinuxにアクセス制御の問い合わせを行う。
‘denied’の結果が返却されれば、ERROR_EACCESSを呼出し元に返す
Access Vector Cache (AVC)を用いて、システムコール回数を最小化
Query
mselinux_check_write()
Access Control Decision
avc_has_perms()
ERROR_SUCCESS
or Yes
on cache?
ERROR_EACCESS
No security
policy
security_compute_av()
System-Call SELinux
OSS Development Study Meeting-06 16
17. ベンチマーク
default
default selinux
selinux
IPsec(ESP)
IPsec(ESP)
191,409
191,409
IPsec(AH)
IPsec(AH)
251,485
251,485
No IPsec
No IPsec
00 100000
100000 200000
200000 300000
300000
number of commands in 30sec
number of commands in 30sec
Iteration of GET/SET mixture, 8threads-client, 4core server x 2, Gb-ether
Less significant differences in same network environment
Penalties in IPsec(AH) communication (~20%?)
OSS Development Study Meeting-06 17