I tested four procedure languages for PostgreSQL 9.2: plpgsql, plperl, plpython2u, plperl and plv8 with Fibonacci numbers function. And V8 was the best!
Saturday, May 4, 2013
Wednesday, April 10, 2013
HOWTO install phpDaemon on CentOS 6.X
The problem is that I can't find PECL modules and some libs for them in repos (standard + remi) or packages versions was to old for phpdaemon. No yum, no easy updates, only source codes =(
Step 1: Install all necessary for building from source. Remember if you don't use remi as a php repo, remove --enablerepo=remi from yum command below.
yum --enablerepo=remi install php-devel openssl-devel gcc make git
Step 2: Get libevent2 and install it (in my case in /opt/libevent2)
wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gztar -xzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable/
./configure --prefix=/opt/libevent2
make && make install
Step 3: Install PECL modules
pecl install event
Don't forget to set libevent installation prefix [/usr] : /opt/libevent2
pecl install eio
pecl install proctitle-alpha
git clone git://github.com/zenovich/runkit.git
cd runkit/
phpize
./configure --prefix=/opt/runkit
make && make install
Step 4: Install phpdaemon
cd /opt
git clone git://github.com/kakserpom/phpdaemon.git
ln -s /opt/phpdaemon/bin/phpd /usr/bin/phpd
Step 5: Configure phpdaemon for your needs =)
Saturday, April 6, 2013
SSH config makes your life easier
How to simplify your day-to-day ssh usage with config file!
As you know there is a rule called '90/10'. 90 percent of users use only 10 percent of software capabilities. And it works not only for huge programs as MS Office but even for small utilities like ps, ls or ssh.
I used ssh for many years as some kind of barbarian who found microscope and uses it for chopping nuts!
Why am I writing all this? Because only one file can save a lot of keyboard clicks!
Ssh client looks for ~/.ssh/config file to apply configuration for new session. Simple example:
Host home
Hostname 192.168.0.100
User root
Port 222
To ssh to your home you can only type ssh home instead of
ssh -p 222 root@192.168.0.100
You can use Host as a mask for several hosts:
Host webfe* *.company.com db*.hosting.com
User root
IdentityFile ~/.ssh/key
And Host * can be set as a default settings for all sessions:
I used ssh for many years as some kind of barbarian who found microscope and uses it for chopping nuts!
Why am I writing all this? Because only one file can save a lot of keyboard clicks!
Ssh client looks for ~/.ssh/config file to apply configuration for new session. Simple example:
Host home
Hostname 192.168.0.100
User root
Port 222
To ssh to your home you can only type ssh home instead of
ssh -p 222 root@192.168.0.100
You can use Host as a mask for several hosts:
Host webfe* *.company.com db*.hosting.com
User root
IdentityFile ~/.ssh/key
And Host * can be set as a default settings for all sessions:
Host *
Compression yes
CompressionLevel 7
Cipher blowfish
See man ssh_conf for more sugar!
Thursday, December 20, 2012
How to clear cached memory on linux
Since 2.6.16 you need only echo to clear cached memory on Linux box.
This will clear all cached memory.
echo 3 > /proc/sys/vm/drop_cachesYou can clear only part of it by using 1 or 2. All options:
- 1 to clear cached pages.
- 2 to clear dentries and inodes.
- 3 to clear all cached memory.
Links:
I found this advise here
Some notes about Linux VFS
Linux Page cache
Subscribe to:
Posts (Atom)