This page last changed on Sep 03, 2009 by jseverino.

This page can be used as a guide to obtain detailed performance information of your instance.

Please read the Confluence Reporting HOWTO for information about the reporting capabilities of Confluence, including the {sql} macro, charting and security.

Users and usage

Users

What is the typical number of concurrent active users i.e. number of concurrent requests being processed?

  • users with currently active requests
  • users currently using Confluence: eg including reading a page, editing a page, viewing search results.
  • users with sessions held in application server memory.
  • users logged in active users (Note that Confluence uses "Remember Me" Session cookies and in my experience of Confluence, users never explicitly log out).
  • define user types (viewer, editor, etc)

– light viewer
– rss reader
– searcher
– infrequent editor
– frequent editor
– administrator
– commenter

Usage

What is the average number of pages created per day, and similar usage stats (AWStat reports are a good starting place when User Access Logging is enabled)
To help interpret the raw access data, consider these important URL patterns:

Searches: http://<host>/dosearchsite.action
Rss requests: http://<host>/createrssfeed.action
Dashboard: dashboard.action
Creation: createpage.action
Editing: http://<host>/pages/editpage.action
Administrators: http://<host>/admin/*

Database usage statistics

The following SQL statements are for PostgreSQL database. You may need to adjust the queries to suit your database.

Note: specify the date range

Table sizes
SELECT relname, reltuples, relpages FROM pg_class ORDER BY relpages DESC ;
  • Example result:
relname reltuples relpages
pg_toast_1404472 115842 30116
trackbacklinks 451197 23832
bodycontent 170462 18197

The column reltuples is the number of rows in the table, relpages is the number of 8 KB pages used by the table. Indexes are included in this list as well.

In this example, the bodycontent table includes 170462 rows and is approximately 142 MB (18197 * 8 KB) in size.

Content created per day
select contenttype, min(number_of_changes), max(number_of_changes), avg(number_of_changes)
from (
    select contenttype, date_trunc('day', creationdate) , count(*) as number_of_changes 
    from content 
    where content.creationdate > date '2007-01-01' and version = 1
    group by contenttype, date_trunc('day', creationdate)        
     ) as dates
group by contenttype
  • Example result:
contenttype min max avg
DRAFT 4 6 5.0000000000000000
MAIL 1 1 1.00000000000000000000
COMMENT 1 54 20.5040000000000000
USERINFO 1 45 15.8112449799196787
SPACEDESCRIPTION 1 3 1.1403508771929825
PAGE 1 119 21.4593495934959350
BLOGPOST 1 64 5.5925925925925926
Content edited per day
select contenttype, min(number_of_changes), max(number_of_changes), avg(number_of_changes)
from (
    select contenttype, date_trunc('day', lastmoddate) as changedate, count(*) as number_of_changes 
    from content 
    where content.creationdate > date '2007-01-01'
    group by contenttype, date_trunc('day', lastmoddate)        
     ) as dates
group by contenttype
  • Example result:
    contenttype min max avg
    BLOGPOST 1 718 14.4705882352941176
    COMMENT 1 73 23.5120000000000000
    DRAFT 4 6 5.0000000000000000
    MAIL 1 1 1.00000000000000000000
    PAGE 1 4658 130.2650602409638554
    SPACEDESCRIPTION 1 4 1.2033898305084746
    USERINFO 1 48 16.7991967871485944
Number of existing pages
select contenttype, count(*) from content group by content.contenttype
  • Example result:
    contenttype count
    MAIL 7914
    COMMENT 12983
    SPACEDESCRIPTION 232
    DRAFT 10
    PAGE 81465
    USERINFO 13782
    BLOGPOST 3308
Number of links per page
select http, max(linkcount), min(linkcount), avg(linkcount), stddev_pop(linkcount), stddev_samp(linkcount), var_pop(linkcount), var_samp(linkcount)
from
(
    select contentid, (links.destspacekey = 'http') as http, count(*) as linkcount 
    from links group by contentid, (links.destspacekey = 'http')
) as links_per_page
group by http
  • Example result:
    http max min avg stddev_pop stddev_samp var_pop var_samp
    false 1994 1 5.8366957470010905 32.7082672608353032 32.7104967872521825 1069.8307472062305489 1069.9766000688353519
    true 189 1 2.9633190883190883 6.3609167066017375 6.3614831031752836 40.4612613483250948 40.4684672719846362
http max min avg stddev_pop stddev_samp var_pop var_samp
f 600 1 5.8769371011850501 21.0221241817454213 21.0245200019346061 441.9297051127255987 442.0304413117483308
t 695 1 3.9395946999220577 12.8270107456162932 12.8282606370439241 164.5322046681558531 164.5642709719305862
Number of characters per content body
select max(blength), min(blength), avg(blength), stddev(blength), variance(blength) 
from (select length(body) as blength from bodycontent) as bodylengths
where blength > 0
  • Example result:
    max min avg stddev variance
    488707 1 2826.5649320388349515 8858.740996699238 78477292.046599816739

(Note this query takes a long time to execute.)

Number of characters per page body
select max(blength), min(blength), avg(blength), stddev(blength), variance(blength) 
from (select length(bodycontent.body) as blength 
      from bodycontent, content 
      where bodycontent.contentid = content.contentid and contenttype='PAGE'
     ) as bodylengths
where blength > 0
  • Example result:
    max min avg stddev variance
    488707 1 3333.0885906386048069 9884.337162920180 97700121.150284961908
Attachments
select count(*), max(filesize), min(filesize), avg(filesize), stddev(filesize), sum(filesize) from attachments;
  • Example result:
    count max min avg stddev sum
    16082 107431588 0 207641.309725158562 2447904.9322 3339287543
Attachments per page

List the stats for attachments per page, only for those pages that actually have attachments.

select count(*) as pages_with_attachments, avg(attachments_per_page), max(attachments_per_page), min(attachments_per_page), stddev(attachments_per_page) from
( select count(*) as attachments_per_page from attachments group by attachments.pageid ) as app
  • Example result:
    pages_with_attachments avg max min stddev
    4197 3.8317846080533715 231 1 10.7013051235493489
Configuration / plugin data stored in Bandana
  • Just the global context
    select count(*), sum(length(bandanavalue)) from bandana where bandanacontext = '_GLOBAL' 
  • Example result:
    count sum
    84 47729
  • All of the information
    select count(*), sum(length(bandanavalue)) from bandana 
  • Example result:
    count sum
    665 153094
Content

It is essential to obtain the typical configuration of database (#pages, #spaces, #registered users, etc), based on Global Stats Plugin

Home directory usage statistics

On Unix-based environments like Linux and Mac OS X, you can use the following commands to gather information about the home directory usage.

Size of home directory components
du -sh /path/to/home/directory/*
  • Example output:
5.9G	attachments
4.0K	backups
13M	bundled-plugins
8.0K	config
4.0K	confluence.cfg.xml
216K	fonts
3.4M	framework-bundles
2.9G	index
12M	plugin-cache
114M	plugins-temp
412K	resources
4.0K	restore
201M	temp
84M	thumbnails
222M	viewfile
Number of attachments, including all versions
find /path/to/home/directory/attachments -type f | wc -l
Document generated by Confluence on Dec 10, 2009 18:41