Skip to content

Instantly share code, notes, and snippets.

View halaei's full-sized avatar
🎵
Code for music

Hamid Alaei Varnosfaderani halaei

🎵
Code for music
View GitHub Profile

Meltdown fix impact on Redis performances in virtualized environments

UPDATE: apparently kernel difference may have a serious impact, so I'll redo the test from scratch.

Test performed with AOF enabled, fsync policy 1 second, allowing the rewrites to be triggered.

Command lines used:

<?php
declare(ticks = 1);
class TimeoutException extends Exception {};
function signal_handler($signal) {
throw new TimeoutException();
}
@bdotdub
bdotdub / redis.markdown
Created November 24, 2010 22:18
Running redis using upstart on Ubuntu

Running redis using upstart on Ubuntu

I've been trying to understand how to setup systems from the ground up on Ubuntu. I just installed redis onto the box and here's how I did it and some things to look out for.

To install:

Running redis using upstart on Ubuntu

I've been trying to understand how to setup systems from the ground up on Ubuntu. I just installed redis onto the box and here's how I did it and some things to look out for.

To install:

@JPry
JPry / curl.sh
Created December 21, 2012 01:19
Use CURL to request a domain name/path from a specific IP address. Substitute the domain for "example.com", and the IP address and path in the URL.
curl -H "Host: example.com" -I http://IP.ADD.RE.SS/path/to/file/or/folder/
@zohar
zohar / gist:a047e265e336b329f811
Created February 24, 2015 21:38
MongoDB: Find by regular expression and run regex replace on results
/*
MongoDB: Find by regular expression and run regex replace on results
*/
db.test.find({"url": { $regex: 'http:\/\/' }}).forEach(function(doc) {
doc.url = doc.url.replace(/http:\/\/www\.url\.com/g, 'http://another.url.com');
db.test.save(doc);
});
@hollodotme
hollodotme / Install-php7.md
Last active August 11, 2022 06:23
Installing php7-fpm with phpredis and xdebug extension on Ubuntu 14.04

Install php7.0-fpm

# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](https://github.com/oerdnj)
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
//
// ViewController.m
// AVPlayerCaching
//
// Created by Anurag Mishra on 5/19/14.
// Sample code to demonstrate how to cache a remote audio file while streaming it with AVPlayer
//
#import "ViewController.h"
#import <AVFoundation/AVFoundation.h>
@hatak
hatak / carton-setup.sh
Created May 23, 2012 15:22
install perlbrew + cpanm + carton
#!/bin/bash
PERL_STABLE="5.16.1"
echo '%< --- installing perlbrew ---'
echo
curl -kL http://install.perlbrew.pl | bash
source ~/perl5/perlbrew/etc/bashrc
perlbrew install --notest perl-${PERL_STABLE}
@nkt
nkt / Results.md
Last active September 27, 2023 08:24
ReactPHP vs Node.js

wrk -t4 -c400 -d10s http://127.0.0.1:1337/

PHP

Running 10s test @ http://127.0.0.1:1337/
  4 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
 Latency 7.02ms 6.94ms 82.86ms 85.27%