Skip to content

Instantly share code, notes, and snippets.

(emacs@minibox)3> set_benchmark:bench(50000).
Base Case:
Operation Total (microsecs) Average (microsecs)
create 3407 0.068140
read_all 3 0.000060
part_of 1428 0.028560
delete 1590 0.031800
merge 3
ordsets:
strace -f -c erl -noshell -eval "[erlang:now() || _X <- lists:seq(1, 1000000)], halt()."
Process 8937 attached
Process 8938 attached
Process 8939 attached
Process 8940 attached
Process 8941 attached
Process 8942 attached
Process 8943 attached
Process 8944 attached
Process 8945 attached
strace -c erl -noshell -eval "[erlang:now() || _X <- lists:seq(1, 1000000)], halt()."
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
100.00 0.000012 0 41 close
0.00 0.000000 0 42 read
0.00 0.000000 0 1 write
0.00 0.000000 0 30 open
0.00 0.000000 0 2 stat
0.00 0.000000 0 16 fstat
0.00 0.000000 0 147 lstat
@sata
sata / vz
Created March 11, 2012 19:15
/etc/init.d/vz
#!/bin/bash
# Copyright (C) 2000-2009, Parallels, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@sata
sata / vznetcfg.custom
Created March 11, 2012 16:26
additional configuration for network in openvz, used primarly to be able to set up bridges between container and host node
#!/usr/bin/env bash
# /usr/sbin/vznetcfg.custom
# originally from: http://wiki.openvz.org/Using_private_IPs_for_Hardware_Nodes
# a script to bring up bridged network interfaces (veth's) in a container
# modified 2012-03-11 to work with dhcp configured containers
GLOBALCONFIGFILE=/etc/vz/vz.conf
CTCONFIGFILE=/etc/vz/conf/$VEID.conf