Eli

To content | To menu | To search

Sunday, October 23 2011

TortoiseSVN 1.7.1 Released

Release notes for TortoiseSVN 1.7.1 from official site.
The current version of TortoiseSVN 1.7.1 is linked against Subversion 1.7.1.

Overview

Big bugfix release.
Mainly user interface, stability and repo browser issues.

Fixes

  • Check for modifications on multiple targets.
  • Crash in TSVNCache.
  • Cursor stayed as busy after an operation until it was moved.
  • Checked item count in commit dialog is wrong.
  • Resolve conflict dialog resizing issues.
  • Docs are wrong for log filter automation.
  • Missing space in property status text.
  • Unable to close repo browser to repository with username/password required.
  • Too many accesses to the config files.
  • Endless loop in repobrowser.
  • Wrong argument exception in repobrowser.
  • Memory corruption in repository browser.
  • Renamed diff scripts.
  • Tagging externals errors not shown.
  • Tagging externals for files pegs to HEAD.
  • Win7 library loses command buttons.
  • "Search for:" string is trimmed forcibly in TortoiseMerge.
  • Crash when editing externals property.
  • Log dialog uses wrong file if sorted.
  • Log dialog does not refresh correctly.
  • Bogus entries in Language Combo on x64.


New Features

No new features in this version.

You can download : TortoiseSVN 1.7.1 32-Bit or TortoiseSVN 1.7.1 64-Bit




Thursday, October 20 2011

Solve 'svn : Working copy is too old (format 10, created by Subversion 1.6)'

Working copy is too old (format 10, created by Subversion 1.6)

This message show up if your are trying to use Subversion 1.7 client with a Subversion 1.6 working copy.

Even if older clients and servers interoperate transparently with 1.7 servers and clients, when a working copy is upgraded to Subversion 1.7 new format, Subversion 1.6 client can no longer be used on it.

You have two solution to solve this error :

  • Keep Subversion 1.7 client and upgrade the working copy to 1.7
  • Unistall Subversion 1.7 client and downgrade working copy to 1.6


Upgrade to Subversion 1.7

Before upgrading to 1.7, a 1.6 client must be used to run svn cleanup on all working copies that require cleanup. Subversion 1.7 cannot upgrade corrupt 1.6 working copies.

Upgrade with Tortoise

Right-click on the working copy Folder, then click on "SVN Upgrade working copy" Upgrade_to_Subversion_1.7_with_Tortoise_1.png
Click on "Upgrade the working copy" on the next step Upgrade_to_Subversion_1.7_with_Tortoise_2.png This may take a while, but your working copy will be in Subversion 1.7 format.

Upgrade with command line client.

Simply use the new Subversion 1.7 command

svn upgrade

And your working copy will be in 1.7 format.

Downgrade the working copy to Subversion 1.6

Use this guide to downgrade a Subversion 1.7 working copy.




Tuesday, October 18 2011

Memcached 1.4.9 Released

Release notes from official site :

Overview

Small bugfix release. Mainly fixing a critical issue where using -c to increase the connection limit was broken in 1.4.8. If you are on 1.4.8, an upgrade is highly recommended.

Fixes

  • Add a systemd service file
  • Fix some minor typos in the protocol doc
  • Issue 224 check retval of main event loop
  • Fix -c so maxconns can be raised above default.


New Features

No new features in this version.

1.4.9 is *not* what 1.4.9-beta1 was.
1.4.10 will be the performance release


You can download it from : http://memcached.googlecode.com/files/memcached-1.4.9.tar.gz




Sunday, October 16 2011

Memcached server profiling with mk-query-digest

Introduction

Monitoring Memcached through hit rate, evicitions sometime is not enough to find what is really happening.
Maatkit have released a Perl toolkit for MySQL and PosteGreSQL, but one tool on this toolkit can also profile Memcached traffic.
This article will focus on mk-query-digest, the Memcached traffic profiler.

Dumping tcp traffic with tcpdump

Before running tcpdump, be aware that it take ~35% load of a one vCPU server here and the output file increase in size at a rate of 300 MB / min, but this may vary, depending on your cached data and requests rate.

You can also tcpdump directly from cache server to get all requests issued to this server, or from an Apache server (In case you only get memcached request asked by this particular server).

Installation

To start profiling we first have to capture memcached network traffic with tcpdump, in case you don't have it installed, you can grab it from www.tcpdump.org or using your system installation prefered method.

Using tcpdump

To start the tcpdump, use the command below :

/usr/sbin/tcpdump -s 65535 -x -n -q -tttt -i eth0 port 11211 > /tmp/tcpdump.log

For more information about tcpdump filters, take a look at this documentation
Server will respond if everything is fine :

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes*

To stop tcpdump, hit CTRL + C, result will show like this :

599513 packets captured
607766 packets received by filter
8244 packets dropped by kernel

And were done with the tcpdump. Let's profile !

Memcached profiling

Although mk-query-digest is designed to be as efficient as possible, it can use a lot of CPU and memory, so I prefer to move log output on our log analysis server. After log file is moved, we can install mk-query-digest.

Download the latest release of mk-query-digest

Simply execute

wget http://www.maatkit.org/get/mk-query-digest

or

wget  http://maatkit.googlecode.com/svn/trunk/mk-query-digest/mk-query-digest

We also need to enable execution of this perl script

chmod 0777 mk-query-digest


Profiling with mk-query-digest

Then we can start profiling with the help of http://www.maatkit.org/doc/mk-query-digest.html

During profiling, mk-query-digest will inform us that it is always running (A nice addition of a recent release)

dump_merlie.log:  28% 01:14 remain
dump_merlie.log:  57% 00:45 remain
dump_merlie.log:  85% 00:14 remain

Note that if you CTRL + C before the end, mk-query-digest will also put display the results of data he has already computed

Results by Memcached server response code

First command is to show all memcached response code from tcpdump

./mk-query-digest --type memcached --group-by res --limit 10 /tmp/tcpdump.log

After some time result will be displayed.

mk-query-digest_global.png

What it tell us :

General & time stats

mk-query-digest_global_overall.png
First line show us that during 331.83k memcached queries, there was 4 unique results for the --group-by res (VALUE, INTERRUPTED, NOT_FOUND, STORED), and that during the time interval it was issued 780.87 query per second with a 1.42x concurrency.
Lines below show us time taken to respond to theses commands (min, max, avg, 95%, ...)

Commands, miss & errors

mk-query-digest_global_commands.png

Finally, we see what commands were issued to memcached, and what errors takes place (that is why % sum are above 100%) but we have to distingish two set of datas :

Memc_get tell us logically that 96% of 331K commands where get, 3% were set commands, and 4 commands where replace, this finally lead us to 100%
Memc_miss is for any command that result in a NOT_FOUND, in this case, 3% of all command tried to access to a nonexistent key.
Memc_error refers to retrieval (gets) commands that were INTERRUPTED, 56 of the 308K gets were in this case.

Memcached results

mk-query-digest_global_results.png
The columns should be fairly self-explanatory: rank, query ID (Not in use here), response time sum and percentage of total, number of calls and response time per call, and results (asked by our --group-by res)

First observation

As we can deduce from above screen, it seems that this server have a pretty good hit ratio (Only 3% miss) and every NOT_FOUND seems to be followed by a STORED (A miss in a get command followed by a set), and everything is fast. But we found 56 INTERRUPTED (0.0001%) that takes alone 24.8% of the time taken to execute 270K commands. Next we have to find what is wrong with these 0.0001% of total command that goes INTERRUPTED.

Following results : VALUE result

After this summary, every result is detailed, first the VALUE result

mk-query-digest_value_global.png

Let's see what each part say :

General & time stats

mk-query-digest_value_overall.png
This part is similar to the general time & stats screen, you've got here time stats (total, max, avg, 95%, ...), hosts that asked for values with percent repartition, size of return values (total, max, avg, ...), and distribution of commands (I think the two set commands is a misread by mk-query-digest)

Query time distribution

mk-query-digest_value_query_time.png
This is particulary interesting logarithmic chart of time clustering, it show distribution of time of requests execution. As we see, most of them are under 100us, and a small part of them are a bit slow.
You have to check this charts, high response time must be avoid.

Looking a overall stats, it seem one request take 200s to execute, it can be a lot of things, client closing connection, network problem, in my case, 314s total - 200s max = 114 s to execute and send 308K get request seem to be pretty good, i will not investigate this more, but will watch it regulary. I will make another profiling to see what's happening after explaining INTERRUPTED.

INTERRUPTED

mk-query-digest_interrupted_global.png
Time chart show that INTERRUPTED requests take lot of time, that one object is 1023.86kBytes (limit is 1024), but key print can't show us if one particular key is the cause.
So we have to change our mk-query-digest parameters to investigate further

Memcached result INTERRUPTED, grouped by keys

What I want is to see what key retreival were interrupted, to see if a particular key is broken or something similar.

Building the mk-query-digest query

Mk-query-digest support PERL regular expressions and give acces to EventAttributes (see this documentation).
Do not hesistate to test your own commands, if something is wrong, mk-query-digest will tell it when you launch it.
So with some tweak, we now have a request that will ask to only show INTERRUPTED events grouped by key to find what iis messed up.

./mk-query-digest --type memcached --group-by key  --limit 10 --filter 
                  '($event->{res}) =~ m/INTERRUPTED/' /tmp/tcpdump.log


Result

mk-query-digest_interrupted_bykey.png
We now see that one particular key take 116 sec, the others are bellow 1 sec.
By using phpMemcachedAdmin, to make a get request with theses key, nothing seemed wrong, values were returned very quickly, so my first clue about connection closed seems right.

Another thing i note is that using hash for memcached key is a good idea, but our developers need to put some ID before, like projectA_aee2ff ...., because looking a theses key, i can't see what it refers to.

Looking for big return values

We can also look for response time of big values, or find values that will go beyond the 1MBytes Memcached limit.

./mk-query-digest --type memcached --group-by fingerprint  --limit 10 --filter
                  '($event->{bytes}) >= 1_000_000'  /tmp/tcpdump.log
Results

I only get one result for this particular request mk-query-digest_bigvalues.png

This key is exactly at the Memcached maximum object size, and must be watched and/or reduced in size.

Useful Options

--save-results
Save results to the specified file.

--timeline
Show a timeline of events.

./mk-query-digest --type memcached --timeline --group-by res /tmp/tcpdump.log

mk-query-digest_timeline.png

--watch-server
This option tells mk-query-digest which server IP address and port (like "10.0.0.1:3306") to watch when parsing tcpdump

Resources

Tcpdump homepage : www.tcpdump.org
Tcpdump filters explanation : http://www.cs.ucr.edu/~marios/ethereal-tcpdump.pdf
Maatkit homepage : http://www.maatkit.org/
Mk-query-digest homepage : http://www.maatkit.org/doc/mk-query-digest.html




Tuesday, October 4 2011

Memcached 1.4.8 Released

Release notes from official site :

Overview

Feature and bugfix release. New Touch commands, counters, and a change to connection limit functionality. Included is an important bugfix for binary protocol users. The binary get command was not activating the LRU algorithm. Fetching an item would not prevent it from getting expired early.

Fixes

  • Fix to write correct pid from start-memcached
  • Fix to enable LRU when using binary protocol
  • Upgrade stats items counters to 64bit
  • Add new stats expired_unfetched, evicted_unfetched
  • Allow setting initial size of the hash table
  • Expose stats for the internal hash table
  • Issue 220 : incr would sometimes return the previous item's CAS
  • Fixed bug on multi get processing
  • Experimental maxconns_fast option
  • Add an ASCII touch command
  • Add binary GATK/GATKQ
  • Backport binary TOUCH/GAT/GATQ commands
  • Issue 221 : Increment treats leading spaces as 0
  • Fix compile error on OS X


New Features

Touch Commands

Binary Touch/GAT commands were backported from 1.6. New GATK/GATKQ commands were added for completeness. Finally, an Ascii protocol touch command was also added.

Touch commands are used to update the expiration time of an existing item without fetching it. Say you have a counter set to expire in five minutes, but you may want to push back the expiration time by five more minutes, or change it to 15 minutes. With touch, you can do that.

The binary protocol also adds GAT commands (Get And Touch), which allow you to fetch an item and simultaneously update its expiration time.

Fast Connection Limit Handling

A new option, -o, has appeared! With -o new, experimental, or highly specific options are given full names. The first of which is maxconns_fast

$ memcached -o maxconns_fast

This option changes the way the maximum connection limit is handled. By default, when memcached runs out of file descriptors, it stops listening for new connections. When this happens, connections will sit in the listen backlog (defaulting to 1024, and adjustable with the -b option). Once some connections close off, memcached will starts accepting new connections again and they will be served.

This is undesireable as it can cause clients to delay or timeout for a long period of time. Long enough that it may be quicker to treat the items as a cache miss.

When a client connects and memcached is configured with maxconns_fast, it writes an error to the client and immediately closes the connection. This is similar to how MySQL operates, whereas the default is similar to Apache.

It is experimental as it is unknown how clients will handle this change. Please help test and report any issues to upstream client maintainers!

Internal Hash Table

STAT hash_power_level 16
STAT hash_bytes 524288
STAT hash_is_expanding 0

Now it's possible to see how much memory the hash table itself uses. This can be useful for deciding on RAM limits for very large instances.

There is also a new option for setting the size of the hash table on startup:

$ memcached -o hashpower=20

If you run instances with many millions of items, and items are added very rapidly on a restart, it may be desireable to presize the hash table. Normally memcached will dynamically grow the hash table as needed, and this operation is generally very low overhead. If you put decals on your '96 Mazda grapefruit shootermobile, you may like this option.

Just examine the hash_power_level before restarting your instances, and adjust the startup command.

expired_unfetched, evicted_unfetched

The two stats represent items which expired and memory was reused, and valid items which were evicted, but never touched by get/incr/append/etc operations in the meantime. Useful for seeing how many wasted items are being set and then rolling out through the bottom of the LRU's.

If these counters are high, you may consider auditing what is being put into the cache.

You can download it from : http://memcached.googlecode.com/files/memcached-1.4.8.tar.gz




- page 2 of 11 -