Tech Blog

proxy_http vs proxy_ajp benchmark

Posted At : March 18, 2010 1:20 AM 2 Comments

After I posted a previous blog entry about configuring railo & tomcat with apache and mod_proxy_http, Paul Kukiel and Gary Gilbert suggested that I should be using mod_proxy_ajp.

This has been something I've been looking at, but haven't found a compelling reason for one over the other.

Proxy AJP is claimed to be faster as it is a "Wire protocol" but I couldn't find any benchmarks around this.

So I decided to do a very quick and dirty benchmark to satisfy my curiosity. This is not a scientific process, I just ran a simple railo testpage on the same machine with 50 threads of jmeter requests hitting it.

First I enabled proxy_http and ran it four times, then enabled proxy_ajp and repeated. The config is below:

# Proxy HTTP config
<IfModule mod_proxy_http.c>
   <Proxy *>
   Order deny,allow
   Allow from all
   </Proxy>
   ProxyPassMatch ^/(.*\.cfm)$ http://testsite.railo:8080/$1
   ProxyPassReverse / http://testsite.railo:8080/
</IfModule>

# Proxy AJP config
<IfModule mod_proxy_ajp.c>
   <Proxy *>
   Order deny,allow
   Allow from all
   </Proxy>
   ProxyPassMatch ^/(.*\.cfm)$ ajp://testsite.railo:8009/$1
   ProxyPassReverse / ajp://testsite.railo:8009/
</IfModule>

Results:

RunHTTP Requests/secAJP Requests/sec
Run 1206.9181.4
Run 2203.9143.6
Run 3194.6189.2
Run 4204.6191.4
Average202.5176.4

The results showed that the proxy_http module was faster - i.e. more requests per second could be pushed through.

I'm putting this down to the fact that proxy_ajp has to convert the http request into it's binary format, while proxy_http really just has to pass it along.

In different scenarios and network configurations the results may be different, but for now I'm going to stick with the http proxy.

Proxy AJP has one other benefit, in that is passes along some extra flags such as whether the request is https or not, but for our purposes we don't need this.

Cheers, Mark

Split first name and last name with Openoffice/Excel

Posted At : February 23, 2010 10:21 AM

I've been dealing with a lot of spreadsheets of usernames recently and sometimes you get firstname and lastname in seperate columns, and sometimes in the same column.

If you get them in the same column but need them in two columns here are two little formulae to do it:

FullName | FirstName | Lastname |
Mark Lynch | =MID(A2,1,FIND(" ",A2,1)) | =MID(A2,FIND(" ",A2,1)+1,100) |
Which will look like:
FullName | FirstName | Lastname |
Mark Lynch | Mark | Lynch |
This basically seperates the string on the space between the names and puts it into each column

Cheers, Mark

Jmeter over SSH Socks proxy

Posted At : January 6, 2010 11:25 PM

I've been doing some testing recently where I need to connect via SSH server to a remote network to run some load testing.

To do this I used a SSH sock proxy like I have previously blogged about.

So I fired this up so that I could review the site I wanted to look at. It worked a charm through firefox but there is no where to set up the proxy in jmeter.

To make it work you need to let the JVM know what proxy to use like so:

java -DsocksProxyHost=localhost -DsocksProxyPort=8080 -jar ApacheJMeter.jar

No jmeter will use the socks proxy on port 8080 on my local machine. Nice.

Job Vacancy Sydney AU - QA Test Lead - Learnosity

Posted At : September 2, 2009 5:44 AM

2 September 2009, Learnosity are looking for a QA Test Lead in Sydney.

About Learnosity

Learnosity develop cutting edge tools for teachers and educators. Our flagship product Learnosity Voice uses the telephone to enable language students and teachers to interact on a one to one level.

Our service:

  • Makes it practical for students to practice Oral and Aural skills
  • Is efficient and effective for teachers, as they can listen to each student individually at a time to suit them
  • Can be used for homework assignments or “High Stakes Assessments”

About the role:

Working as an integral part of the Learnosity development team you will ensure delivery of high quality products through the development of a formalised testing framework, documentation of releases, and management of the UAT component of all software projects.

  • Create and implement test plans for each project
  • Conduct functional and non-functional testing including UAT, Load and regression testing
  • Review and sign off test reports
  • Track, allocate and prioritise areas to be tested
  • Manage the release process from development through staging and production
  • Report and manage defect analysis process including logging, tracking and testing
  • Produce high quality documentation and release notes
  • Implement automated testing and build processes

Who we looking for:

Qualifications & Attributes

  • Self motivated person willing to continually learn and improve themselves and processes around them.
  • Tertiary qualifications at associate diploma level or equivalent in computing or a related discipline or an equivalent combination of training and experience.
  • Minimum of 2 years work experience within a dot com or software development environment.

Knowledge & experience

  • Ability to translate requirements and functional specifications into test cases
  • Hands on experience across multiple applications of end-user technologies
  • Understanding of Project Management concepts
  • Strong skills and history working in a test and release management position in a dot com or software development environment
  • Testing methodologies and procedures, including load testing
  • Knowledge and/or experience of testing tools and techniques
  • Release management procedures
  • Highly developed written skills
  • Excellent proven communication and people skills including client liaison and documentation
  • Demonstrated ability to organise and plan work with care and attention to detail while meeting deadlines
  • Ability to work independently and as part of a team

This is a full time role and you will be working in a casual workplace with flexible hours in the centre of Sydney.

If this sounds like the job for you, email your resume and covering letter to mark@learnosity.com - no agencies please.

Two quick server tips

Posted At : August 14, 2009 10:12 PM 1 Comments

Here are two quick tips that I've recently found for server admins:

  • Automatically fixing file system errors
  • Ignoring directories from updatedb

Automatically fixing file system errors

If you have a remote server, i.e. at a data center 10km or 1000km away this should prevent some panic when rebooting the server remotely.

Ext2/3 will do a filesystem check after a certain number of reboots or time. Most of the time any errors are fixed automatically, but certain errors by default require the root shell and the administrator to fix them. I've seen a few of these happen, but I have always replied yes to the prompts as I don't know enough about file systems to fix it I said no.

So, to prevent the need to rush to a data center and plug in a keyboard and mouse just to press the "Y" key there is and option to automatically assume yes.

On Ubuntu in the file /etc/default/rcS you need to change the following:

FSCKFIX=no
to
FSCKFIX=yes

Ignoring directories from updatedb

If you have a backup server you may not want it to update the locate db for all your backup files, as it can take a very long time.

To tell locate to ignore a directory you need to add it to the PRUNEPATHS line in the /etc/updatedb.conf file like so:

PRUNE_BIND_MOUNTS="yes"
PRUNEPATHS="/tmp /var/spool /media /srv"
PRUNEFS="NFS nfs nfs4 afs binfmt_misc proc smbfs autofs iso9660 ncpfs coda devpts ftpfs devfs mfs shfs sysfs cifs lustre_lite tmpfs usbfs udf rpc_pipefs"

In the above code I have added the /srv entry to make it ignore all my backups which are held under the /srv directory.

Note: These tips were tested on Ubuntu linux, other distributions will have similar functionality but the file locations may vary.

Cheers, Mark

HOWTO generate diff files from subversion

Posted At : March 3, 2009 12:46 AM

Here's a nice and quick way to generate a diff file from subversion and store it on your local machine.

svn diff filepath/myFile.ext > saveDirPath/myFile.ext.diff

Where filePath is the local path to your working directory in which your file is located. And saveDirPath is the path where you want to save your diff file.

Diff files can be very useful when contributing to open source projects.

You can also get a list of files changed between revisions.

Marko

SVN - Get list of files changed between revisions

Posted At : January 16, 2009 2:18 AM

For my own reference, here is how to get the list of files that have changed between any two subversion revisions.

svn diff --summarize -r5:10 http://svn.example.com/trunk

This will give something like:

If you want to get the revisions from a revision to the latest then you can change the 10 to HEAD - eg:

svn diff --summarize -r5:HEAD http://svn.example.com/trunk

Cheers, Mark

Remote collection of vmstat log files

Posted At : December 1, 2008 10:42 PM 1 Comments

We've been doing a lot of load testing recently and are planning on doing a lot more, so we've developed a simple little script to make the collection of the vmstat (performance statistics) a bit quicker.

multivmstat is a php command line script which makes it easy to collect the statistics. Download the script

To run it you specify a list of servers to check:

./multivmstat server1,server2,server3 5

This will run vmstat on each of the servers with a 5 second interval between samples.

It will create the following files:

server1-vmstat.log
server2-vmstat.log
server3-vmstat.log

Note: You mush have ssh access to each machine - ideally with a certificate so that no interactive authentication is required.

Download the script

Choppy sound on Twinkle Softphone on Ubuntu Linux - Solved

Posted At : November 6, 2008 9:53 PM 1 Comments

I just reinstalled my system with the latest Ubuntu 8.10 x64 and one of the apps I use regularly for testing and developing Asterisk applications is Twinkle, which is a great VOIP softphone.

It works great, but when I tried it in my new install the sound was all choppy, i.e. I would get every half of each second of the audio.

A bit of fiddling about with the settings and I got it solved. Posting it here so when I forget about it and run into the same problem again I'll know how to fix it.

The solutions is as simple as:

  • From the menu select Edit -> System Settings.
  • Select Audio on the left
  • Change the audio devices to use the most approriate device that is NOT "ALSA: default: Default Device" - in my case it was "ALSA: plughw:0,0: HDA Intel (AD193x Analog)"

I do like the very friendly naming scheme for devices :-) Hope it helps, Mark

Job Vacancy Sydney AU - Graduate or Junior OO Programmer

Posted At : May 8, 2008 2:17 PM

We're looking for a Computer Science Graduate or similar with strong Object Oriented programming skills and the ability to grasp cutting edge technologies quickly.

If you are looking to work with the latest technogies and are a motivated self starter with a positive "can do" attitude this is the job for you. The ability to take problems and deliver solutions is a must.

There will be significant on the job learning as we are always pushing the boundaries and using the latest and greatest technologies. We are currently working on projects using Actionscript/Flex, ColdFusion, PHP, and Javascript, and are leveraging technologies such as VOIP, SMS, Instant Messenger (Jabber XMPP) to deliver cutting edge solutions.

Suitable applicants will have a Bachelors Degree in Computer Science or Engineering, or similar tertiary qualification. Remuneration commensurate with experience.

Responsibilities would include:

  • Developing new functionality for Asterisk and VOIP applications
  • Creating Rich Internet Applications with Adobe Flex
  • Creation of Desktop applications with Adobe AIR
  • Design and development of new Web applications

Must haves:

  • A robust foundation in Object Oriented programming
  • Demonstrated experience in at least one OO language
  • Motivation to learn and push the boundaries
  • Understanding of XHTML and CSS

Preferable:

  • Experience with PHP, ColdFusion, Farcry CMS, XML, Web Standards etc
  • Competency using linux-based tools (SSH, bash, etc)
  • Familiar with using source control tools (Subversion, etc)
  • Familiarity with Actionscript or Flash

This role may be full time, part-time or on a contract basis depending on the candidates skills and experience. You will be working in a casual workplace with flexible hours in the centre of Sydney.

If this sounds like the job for you email your resume to mark@lynchconsulting.com.au if interested - no agencies please.