Skip to content

Instantly share code, notes, and snippets.

概要

Fluentdは JSONストリームとしてログを扱うログ収集デーモンです。
これまでのところ、最大のユーザーではピーク時で
100台以上のサーバ、650GB daily 、70,000msgs/sec のログを収集しています。

目的

@funny-falcon
funny-falcon / changes.md
Last active March 23, 2024 05:53
Performace patch for ruby-1.9.3-p327

Changes:

  • this version includes backport of Greg Price's patch for speedup startup http://bugs.ruby-lang.org/issues/7158 .

    ruby-core prefers his way to do thing, so that I abandon cached-lp and sorted-lf patches of mine.

  • this version integrates 'array as queue' patch, which improves performance when push/shift pattern is heavily used on Array.

    This patch is accepted into trunk for Ruby 2.0 and last possible bug is found by Yui Naruse. It is used in production* for a couple of months without issues even with this bug.

@kmaehashi
kmaehashi / gist:5036511
Last active December 14, 2015 05:39
Jubatus RPC 関連の課題整理

RPC 関連の課題整理

  • Jubatus サーバのタイムアウト機能を使用したくないユーザ (--timeout 0) の救済方法を検討する

  • Jubatus サーバのタイムアウト機能を使用したいユーザの救済方法を検討する

    • サーバから timeout で自動切断(サーバから TCP FIN パケット送信)された後に RPC メソッドを呼んだ際に RPC エラーが起きるのが不親切 (C++/Python/Ruby のみ)
  • 解決策の案(松): サーバから受け取った FIN リクエストを正しくハンドリングするように修正 (msgpack-rpc ライブラリを修正)

@suma
suma / msgpackrpc.md
Last active May 9, 2016 22:59
MessagePack RPCクライアントの振る舞い及びエラー処理

MessagePack RPCクライアントの振る舞い及びエラー処理

概要

MessagePack-RPCのクライアントのエラー処理を正しく、またその後に何をすべきか(可能か)まとめる。 「このエラー起きたとき、どう処理すべきか?」ということを説明する。

説明しないこと:RPCサーバの作り方、各言語のライブラリのプロトコル実装やエラー定義の差。

# -*- coding:utf-8 -*-
## why define like a this?
def _get_getter(o, attribute_string):
return lambda : _getter(o, attribute_string)
def _getter(o, attribute_string):
for k in attribute_string.split("."):
o = getattr(o, k)
return o
@shirou
shirou / README
Last active October 8, 2018 14:53
ansible docker direct connection plugin
前提
-----------
- docker 0.9.1
- lxcを入れること
- linux 3.11で確認。 3.8以上じゃないとだめっぽい。
- ubuntu image (docker pull ubuntuで取ってきたもので試してみた)
- imageにはpython2を入れておくこと
- /usr/bin/tee がimageにあること
@kminiatures
kminiatures / gist:df34f50e390b80f51a4c
Created May 23, 2014 02:01
bitbucket pull-request POST hook to Slack chat
<?
function hash_value($obj, $keys){
if(empty($keys)) return $obj;
$key = array_shift($keys);
if(isset($obj[$key])){
return hash_value($obj[$key], $keys);
}else{
return '';
}
}
@norio-nomura
norio-nomura / swift-demangle-filter.py
Last active April 27, 2022 04:17
`swiftc -emit-assembly`してシンボルを`swift-demangle`で変換する
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# usage: swift-demangle-filter.py [-h] [-o <outfile>] [<file> <options>]
#
# Read swift assembly, demangle Swift Symbol and output it.
#
# positional arguments:
# <file> <options> If <file> has .swift, compile it with <options>; or read
# (<file> or <stdin>) as assembly.
@odashi
odashi / chainer_encoder_decoder.py
Last active January 22, 2021 14:03
Training and generation processes for neural encoder-decoder machine translation.
#!/usr/bin/python3
import datetime
import sys
import math
import numpy as np
from argparse import ArgumentParser
from collections import defaultdict
from chainer import FunctionSet, Variable, functions, optimizers