[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

PRAGMA page_size;

From: Daniel Shahaf <danielsh_at_elego.de>
Date: Thu, 16 Feb 2012 01:49:25 +0200

http://www.sqlite.org/pragma.html#pragma_page_size

Apparently changing the PAGE_SIZE pragma has a significant effect on the
wc speed:

% rm -rf d && time ( export _SVN_PRAGMA='PRAGMA page_size = 65536;'; echo $svn; $svn co -q file:///tmp/svn/r1 d && $svn pl -R d >/dev/null )
/home/daniel/src/svn/t1/subversion/svn/svn
\
Time spent in user mode (CPU seconds) : 5.73ss
Time spent in kernel mode (CPU seconds) : 14.11ss
Total time : 28.70ss
% rm -rf d && time ( export _SVN_PRAGMA='PRAGMA page_size = 65536;'; echo $svn; $svn co -q file:///tmp/svn/r1 d && $svn pl -R d >/dev/null )
/home/daniel/src/svn/t1/subversion/svn/svn
\
Time spent in user mode (CPU seconds) : 5.86ss
Time spent in kernel mode (CPU seconds) : 14.24ss
Total time : 29.19ss

% rm -rf d && time ( export _SVN_PRAGMA='PRAGMA page_size = 4096;'; echo $svn; $svn co -q file:///tmp/svn/r1 d && $svn pl -R d >/dev/null )
/home/daniel/src/svn/t1/subversion/svn/svn
\
Time spent in user mode (CPU seconds) : 5.29ss
Time spent in kernel mode (CPU seconds) : 5.44ss
Total time : 20.56ss
% rm -rf d && time ( export _SVN_PRAGMA='PRAGMA page_size = 4096;'; echo $svn; $svn co -q file:///tmp/svn/r1 d && $svn pl -R d >/dev/null )
/home/daniel/src/svn/t1/subversion/svn/svn
\
Time spent in user mode (CPU seconds) : 4.82ss
Time spent in kernel mode (CPU seconds) : 6.20ss
Total time : 19.51ss

% rm -rf d && time ( export _SVN_PRAGMA='PRAGMA page_size = 1024;'; echo $svn; $svn co -q file:///tmp/svn/r1 d && $svn pl -R d >/dev/null )
/home/daniel/src/svn/t1/subversion/svn/svn
\
Time spent in user mode (CPU seconds) : 5.25ss
Time spent in kernel mode (CPU seconds) : 5.30ss
Total time : 19.06ss
% rm -rf d && time ( export _SVN_PRAGMA='PRAGMA page_size = 1024;'; echo $svn; $svn co -q file:///tmp/svn/r1 d && $svn pl -R d >/dev/null )
/home/daniel/src/svn/t1/subversion/svn/svn
\
Time spent in user mode (CPU seconds) : 5.00ss
Time spent in kernel mode (CPU seconds) : 6.72ss
Total time : 15.81ss

(wc resides on /tmp ext3 partition, checkout is to /home ext3 partition
on the same disk, using current trunk binaries, with the attached patch,
using sqlite-3.7.3 from Debian. I've verified that the pragma took
effect by running 'sqlite3 "pragma page_size;"' afterwards.)

Now, obviously just using the 65k (the maximum) for the pragma isn't
always a good idea; but should we make this configurable? I imagine
that using, say, 4KB in some setups could have a noticeable difference.

Received on 2012-02-16 00:51:27 CET

This is an archived mail posted to the Subversion Dev mailing list.