Skip to content

Instantly share code, notes, and snippets.

View youyo's full-sized avatar

Naoto Ishizawa youyo

View GitHub Profile
#
.env*
my.cnf
.wercker/
__*
*.exe
*.test
*.prof
*.swp
tmp/
#cloud-config
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQClVm7p5ckjmscB4gfJrI9O9Pa7Wo/7VEVkkgACZut7xBDK7dpD2wsavCUe9s2Ll4jFDc4UjsvypgPYhAGu3k9tGb8v7ysPHC2ZMh1zCdqrvuNMl+w3EnoEJW9iY5/NgCT807TqW890CUww3rHAYyyB0msmN62UgHdELFQHWAa7wNcQeTPUG0r8FaxwTYiMAtKoHz9YQMQJdDrTd6UmOSBWx0SEyBk0RL5v9kWzz4hIsQV80psDcDoSxrj37fSkG3oZDu7sG2owjAaxG5bKgQ3g9e953LnGEiI8ywHVeerL/A1cZTWcoM91aqyiT3goLF7dQFzXzL3iw3OQN/BL3ExN
hostname: coreos1
coreos:
units:
- name: 10-eth0.network
$ fio -filename=efs/test2g -direct=1 -rw=randwrite -bs=4k -size=2G -numjobs=64 -runtime=60 -group_reporting -name=file1
file1: (g=0): rw=randwrite, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1
...
file1: (g=0): rw=randwrite, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1
fio-2.1.5
Starting 64 processes
Jobs: 64 (f=52): [wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww] [100.0% done] [0KB/1272KB/0KB /s] [0/318/0 iops] [eta 00m:00s]
file1: (groupid=0, jobs=64): err= 0: pid=2918: Wed Jun 29 07:50:31 2016
write: io=76032KB, bw=1262.5KB/s, iops=315, runt= 60228msec
clat (msec): min=8, max=366, avg=163.02, stdev=13.49
$ fio -filename=efs/test2g -direct=1 -rw=write -bs=4k -size=2G -numjobs=64 -runtime=60 -group_reporting -name=file1
file1: (g=0): rw=write, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1
...
file1: (g=0): rw=write, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1
fio-2.1.5
Starting 64 processes
Jobs: 64 (f=62): [WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW] [100.0% done] [0KB/1268KB/0KB /s] [0/317/0 iops] [eta 00m:00s]
file1: (groupid=0, jobs=64): err= 0: pid=2852: Wed Jun 29 07:47:05 2016
write: io=76360KB, bw=1267.2KB/s, iops=316, runt= 60221msec
clat (msec): min=7, max=257, avg=192.56, stdev=14.95
phase1:
box:
id: golang:1.6.2-alpine
cmd: /bin/sh
steps:
- wercker/setup-go-workspace:
package-dir: github.com/youyo/wercker-test
- script:
name: Build
code: |-
phase1:
box:
id: golang:1.6.2-alpine
cmd: /bin/sh
steps:
- wercker/setup-go-workspace:
package-dir: github.com/youyo/wercker-test
- script:
name: Build
code: |-
build:
box:
id: youyo/hugo:latest
cmd: /bin/sh
steps:
- script:
name: Build static pages.
code: |-
hugo
@youyo
youyo / php_functions.c
Created February 10, 2016 10:15
sapi/apache2handler/php_functions.c
//AP_DECLARE_DATA extern unixd_config_rec unixd_config;
AP_DECLARE_DATA extern unixd_config_rec ap_unixd_config;
//snprintf(tmp, sizeof(tmp), "%s(%d)/%d", unixd_config.user_name, unixd_config.user_id, unixd_config.group_id);
snprintf(tmp, sizeof(tmp), "%s(%d)/%d", ap_unixd_config.user_name, ap_unixd_config.user_id, ap_unixd_config.group_id);
EXT/GMP/GMP.C: IN FUNCTION ‘ZIF_GMP_RANDOM’:
EXT/GMP/GMP.C:1399:69: ERROR: ‘__GMP_BITS_PER_MP_LIMB’ UNDECLARED (FIRST USE IN THIS FUNCTION)
EXT/GMP/GMP.C:1399:69: NOTE: EACH UNDECLARED IDENTIFIER IS REPORTED ONLY ONCE FOR EACH FUNCTION IT APPEARS IN
This time it's PHP bug #50990. In one of comments there susan dot smith dot dev at gmail dot com suggested solution which works and does its magic:
I solved replacing the outdated __GMP_BITS_PER_MP_LIMB defined constant with GMP_LIMB_BITS. The latter is present in all previous versions, and MPIR define it too.
You have to edit file ext/gmp/gmp.c and replace one occurence of __GMP_BITS_PER_MP_LIMB with GMP_LIMB_BITS, in my case it was in line 1399.
error: '__GMP_BITS_PER_MP_LIMB' undeclared (first use in this function)