Submitted by hswong3i on Sat, 2013-03-09 13:08
緣起緣滅,緣聚緣散,一切都是定數。
員工在第一天上班已能為團隊"帶來"些什麼,是老闆的福氣。
員工在離開的一天能"帶走"些什麼,卻是老闆的成就。
學問、經驗、技術、眼光、信念都是一生受用;
在工作中為員工提供空間和支持,是老闆的責任。
但自我成長與否,老闆卻愛莫能助了。
在Programmer上班的第一天我會問他:
你愛Programming,我也一樣;
但第一年做Programmer;
第二年做Analyst Programmer;
第三年,Senior Analyst Programmer...
那人工,你能加多少?
PM Skill,要再上,你總要學的⋯
離開時,請不要問別人為你做了什麼;
請問,你為自己做了些什麼⋯
Submitted by hswong3i on Fri, 2013-02-22 04:53
When MariaDB Galera Master/Master replication facing deadlock, new connection may not able to process and so looks killed. This can be checked by:
mysql -e 'show processlist'
Temporary Solution
If you see some tables are in status of "Waiting for table metadata lock", then you need to kill all process with:
mysqladmin processlist | \
awk '$2 ~ /^[0-9]/ {print "KILL "$2";"}' | \
mysql
How to Prevent Deadlock?
I am still trying to figure out a long term solution, and now trial with following my.cnf variables, which at least able to pass stress (ab) and availability (httrack) test for 4+ hours continuously:
innodb_stats_on_metadata = 0
wsrep_retry_autocommit = 0
Reference
Submitted by hswong3i on Tue, 2013-02-12 15:08
For building a LAMP cluster, besides identity, filesystem and database synchronize, the next step would be service configure synchronize, e.g. Apache2 and PHP. This can be done by using Csync2, including configuration file status monitoring, synchronize and service restart.
This HOWTO will guide you though installation of Csync2 on Ubuntu 12.04. We will therefore handle both Apache2 and PHP5 for clustering with it.
Submitted by hswong3i on Fri, 2013-02-01 08:45
Project is arrow, client is archer and developer is bow: tension make arrow fly high; but too much will break the bow and hurt archer :-(
Submitted by hswong3i on Thu, 2013-01-24 08:02
After numbers of update to your Debian/Ubuntu installation, usually a lot of legacy kernel image are keep inside your box, so you may hope to remove all of them. Just execute following command (i.e. after aptitude -y full-upgrade && reboot):
dpkg -l 'linux-*' | \
sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | \
xargs sudo apt-get -y purge
Submitted by hswong3i on Fri, 2013-01-18 16:03
Building LAMP cluster one of the key point is: how to synchronize file update among all servers for Apache? Here we have many choice, e.g. DRBD + OCFS2, iSCSI + OCFS2, CephFS, Rsync, etc; but one of the most simple solution is to use NFS for sharing master server's DocumentRoot, e.g. /home. For sure, we are not considering performance and bottleneck here.
This HOWTO will guide you though installation of NFSv4 server and client on Ubuntu 12.04. In order to make uid/gid mapping works, we will reference Single-Sign-On (SSO) setup with LDAP in previous HOWTO. We will also utilize CacheFS for improving the overall performance.
Submitted by hswong3i on Fri, 2013-01-18 14:50
When building a LAMP cluter usually we will face bottleneck at MySQL: traditional MySQL only support master/slave replication, so slave server can only use as scale-out for read access. Therefore how to make use of this read access scale-out will depend on application implementation, e.g. in Drupal we must specify which "read safe" SQL can be send to slave server, individually. This result as very limited improvement in overall performance.
Using MariaDB Galera can simply solve this problem: it is in master/master replication style so most likely application don't need to change any code in cluster environment for share loading, e.g. Drupal can even keep as using "localhost" as target database host among number of cluster member servers, where also works for both Drupal 5.x/6.x/7.x with none of code change. This also means we can scale-out for most LAMP-based application without code changes, too.
This HOWTO will guide you though installing MariaDB Galera on Ubuntu 12.04, plus setup master/master replication between 2 server.
Submitted by hswong3i on Tue, 2013-01-08 00:01
In order to setup a LAMP cluster we usually need a way to share the master server uid/gid with other else member servers, for whatever NFS shared home directory, or running Apache2 + PHP5 in suexec style. Using LDAP + Webmin can simplify this Single-Sign-On (SSO) need in a handy way.
This HOWTO will guide you though installation of Webmin and OpenLDAP server, then use it as SSO between 2 server with nss-pam-ldapd. First of all let's fouce on making it works, and then enhence it with better security.
Submitted by hswong3i on Fri, 2012-12-14 00:08
Amazon S3 provide object storage with "highly scalable, reliable, secure, fast, inexpensive infrastructure" which very useful for different use cases, e.g. storing your team shared files, your website backup, etc. BTW, it is using different protocal when compare with FTP/FUSE/NFS/iSCSI/etc so we need some trick in order to use it as like as local file system and mount it as usual.
s3backer give you an alternative answer when compare with S3QL: s3backer just give you a block device for loopback mount on top of FUSE, so you can format it as whatever EXT4/LVM/OCFS2/etc (where S3QL give you entire file system which it implement internally); s3backer also support other object storage service provider, e.g. Google Storage, Amazon S3 or OpenStack, so we can switch to different vendor if do required; simple implementation so more stable; and key point is: very fast when compare with other solution!
This mini-HOWTO will guide you though some basic for mounting your S3 bucket as local file system, so you can use it for whatever purpose. You need to have Ubuntu 12.04 LTS install correctly.
Submitted by hswong3i on Tue, 2012-12-11 14:33
Amazon S3 provide object storage with "highly scalable, reliable, secure, fast, inexpensive infrastructure" which very useful for different use cases, e.g. storing your team shared files, your website backup, etc. BTW, it is using different protocal when compare with FTP/FUSE/NFS/iSCSI/etc so we need some trick in order to use it as like as local file system and mount it as usual.
S3QL give you the quick answer: it is simple to install and configure, stable and also good in performance; moreover, S3QL also support other object storage service provider, e.g. Google Storage, Amazon S3 or OpenStack, so we can switch to different vendor if do required; and one of the key benefit when compare with other solution, e.g. S3FS, it is supported by Ubuntu 12.04 so I can set it up within 30mins!
This mini-HOWTO will guide you though some basic for mounting your S3 bucket as local file system, so you can use it for whatever purpose. You need to have Ubuntu 12.04 LTS install correctly.
Pages
Recent comments