December 9th, 2008
I have started using JRuby in a Rails project and mostly I am very happy with it. However, one major issue is that Rails startup under JRuby is very slow… and I mean veeery slow. Running a single unit test under JRuby takes 15-16 seconds while running the same test using Ruby (MRI) takes around 0.15 seconds, a factor 100.
The reason for this is that startup of the Rails environment takes a long time under JRuby. When everything is up and running however, performance is great!
So, how to deal with this?
Read the rest of this entry »
Posted in JRuby | No Comments »
July 18th, 2008
We started using VMware server for virtualization running CentOS 5 as host and CentOS 5 and other operating systems as guests. The servers were Dell PowerEdge 2950s with 4 SAS disks in RAID-10 setup.
However, performance was really poor especially for I/O intensive applications. After browsing around a bit I did the following:
- Change I/O scheduler (host and guest)
echo deadline > /sys/block/sda/queue/scheduler
- Increase disk read-ahead (host and guest)
/sbin/blockdev –setra 32768 /dev/sda
- Set size of /dev/shm on host server to same as memory size on server (8 GB) via
mount -o remount,size=8G /dev/shm
And adding an entry in /etc/fstab for it to be set up on boot-time as well
tmpfs /dev/shm tmpfs defaults,size=8G 0 0
- And then add some configuration options to the .vmx files (restart of virtual machines needed after the change):
mem.ShareScanTotal=0
mem.ShareScanVM=0
mem.ShareScanThreshold=4096
sched.mem.maxmemctl=0
sched.mem.pshare.enable = “FALSE”
mainMem.useNamedFile = “FALSE”
MemTrimRate = “0″
MemAllowAutoScaleDown = “FALSE”
This indeed the trick. Performance increased significantly!
Specifically I/O intensive operations does not affect the host server and all virtual machines as previously.
Posted in VMware Server | No Comments »
July 18th, 2008
We ran out of public IP addresses on our site where we map public IP addresses to services on internal servers via MIPs.
When we received more IP addresses in a different subnet I could not easily figure out how to use them until I ran across an article on the Juniper support site.
The solution was really simple:
- Add a routing entry for the new subnet on the external interface (ethernet1) with “0.0.0.0″ as gateway
Network -> Routing -> Destination -> New
- Add MIPs using addresses in the new IP subnet
How simple and it works great!
Posted in Netscreen | No Comments »
January 22nd, 2007
Last week I added a new experience to my list. Our company purchased a domain (smpp.com) from buydomains.com. I must say I was a little skeptical about paying a “horrendous” amount of money, using a credit card, for a domain. However, I must say the process was very swift and completed within 36 hours. Kudos to buydomain.com for that.
When the purchase completed the domain can be maintained via a control panel at domaindiscovery.com. From there DNS servers could be changed and possibly a transfer to another registrar initiated. Simple enough.
So, if you find a domain that you want badly, it is for sale from buydomains.com and you can agree on a price, then I think you can safely go ahead and acquire the domain.
Posted in Internet | No Comments »
December 28th, 2006
JFS (Journaled File System) is a file system from IBM. I have always really liked this file system since I first came across it, working with AIX, but I have never used it in a Linux environment until now. When you read comparisons of different file systems it seems JFS always comes out in a top position. For Linux it is sometimes beaten by XFS, but I think that is due to the fact that XFS is more widely used on Linux.
For some reason RedHat seems to have taken out support for JFS in RHES, but it is available for CentOS using the kernel in the CentosPlus repository. The process to upgrade an existing Centos installation to support JFS is simply to update the kernel with the kernel in centosplus and install jfsutils:
yum –enablerepo=centosplus install kernel-smp
yum –enablerepo=centosplus install kernel-smp-devel
yum install jfsutils
Then you probably need to change the “default” row in grub.conf and reboot to start using the new kernel with JFS support.
To create a JFS file system on a new partition use fdisk and mkfs -t jfs.
I think you need to stick to ext3 for the root and boot file systems though and there is no path (at least that I know of) for migrating an existing ext3 file system to JFS “in place”.
Posted in Linux | 2 Comments »
November 12th, 2006
Postfix is a great e-mail server and you would usually want to keep up with new versions more aggressively than RedHat publishes RPMs for new version. However, I have never succeeded well in compiling Postfix from source with SASL support enabled. The resulting binaries (compiled towards the RedHat SASL rpms) always seem to core dump and mis-behave for reasons I have never understood.However, there is a solution… building an RPM from source and using that RPM for updating.
Read the rest of this entry »
Posted in Linux | No Comments »
November 12th, 2006
Our mail server receives around 10.000 e-mails per day. On weeekdays around 70% is spam, during weekends more than 90% is spam. Lately our mailserver load has been very high leading to poor reponse times. As a result we decided to implement greylisting.
Read the rest of this entry »
Posted in Internet, Linux | No Comments »
November 7th, 2006
Now I have finished a PAM module for sending One-Time Passwords (OTPs) via SMS when using Pluggable Authentication Module (PAM) in Linux.
For more information »
Posted in Internet, Linux | No Comments »
October 4th, 2006
We have experienced high load on one of our web servers lately (Apache 2.0.59 on Linux). So, I started thinking about how to analyze this in a bit more detail. We are running multiple virtual hosts (around 60) so when using tcpdump it is not easy to see which URLs are requested, therefore I looked around for some HTTP-oriented sniffer. My search ended with “urlsnarf” from the “dsniff” package.
Read the rest of this entry »
Posted in Internet, Linux | 2 Comments »