Skip to end of metadata
Go to start of metadata

Here we store some pointers to things that we use to beat up membase.

Test Clients

The Testing cluster with load generator page has a lot of information on test clients. We should probably have more.

Test Servers

The Couchbase Server Simulator documentation describes how we can have a server that creates all kinds of faults and allows us to tests clients and proxies.

Peripheral Test Tools

The labrea project wiki can interpose lua scripts against key system calls. This is an incredibly useful hook to simulate failure conditions. The labrea project site has the full documentation, but here are the basics:

Project source: https://github.com/dustin/labrea

On linux:

1. download and compile from https://github.com/dustin/labrea/tarball/master Or, 64-bit rpm available at: http://github.com/downloads/dustin/labrea/labrea-0.1-1.x86_64.rpm

2. extract the tarball to /usr/local/labrea

3. rename and edit the following scripts:

Add a test.lua script. For example:

[root@localhost memcached]# cat /usr/local/labrea/test.lua
function before_lseek(fd, offset, whence)
   -- if math.random(1, 100) == 13 then
      io.write(string.format("Slowing down a seek on fd=%d to %d (%d)\n",
                             fd, offset, whence))
      usleep(1000000)
   -- end
end

function before_read(...)
    usleep(1000)
end

function before_write(...)
    usleep(1000)
end
cd /opt/membase/bin/memcached/
mv memcached memcached.bin

create a new memcached script

#!/bin/sh

LB=/usr/local/labrea

exec $LB/labrea $LB/test.lua `dirname $0`/memcached.bin "$@"

Restart memcached. Keep in mind that if you slow down the disk seeks / reads, it will slow down the startup time of the process significantly.

killall -9 memcached

For Machines

(describing using firewall rules to make machines appear to have plug pulls)

For Processes

kill -STOP <pid> will completely suspend a process, hanging anything trying to communicate with it synchronously. The process can be resumed with kill -CONT <pid>

To slow a process down a bit, we can renice the process and run something CPU intensive that will greatly limit the CPU time available.

Another approach to slowing down the process would be to use ptrace to intercept it and make certain calls just take longer.

For Networks

(someone dig up the documentation we had for the network simulation stuff we were using before)

Testlink Tools

testlink-cli - An example script and class to access testlink api through python. The current version allows you to execute a specific test.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.