Skip to content

Commit 479b7ff

Browse files
jonat123gitbook-bot
authored andcommitted
GITBOOK-28: Cleaned up articles for uMS.
1 parent bc6c627 commit 479b7ff

File tree

3 files changed

+98
-67
lines changed

3 files changed

+98
-67
lines changed
Lines changed: 59 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,98 @@
1-
# Performance
1+
---
2+
description: >-
3+
We take performance seriously and performance is always on top of mind when
4+
adding new features to Umbraco uMS.
5+
---
26

3-
We take performance serious and performance is always on top of mind when adding new features to uMarketingSuite.
7+
# Performance
48

5-
Within the uMarketingSuite we have implemented several performance optimizations and there are also some configuration you can do yourself to optimize the performance of your Umbraco solution with uMarketingSuite.
9+
Within the Umbraco uMS we have implemented several performance optimizations and there are also some configurations you can do yourself to optimize the performance of your Umbraco solution with uMarketingSuite.
610

7-
## Seperate processes for storing, parsing and reporting
11+
## Separate processes for storing, parsing, and reporting
812

9-
As documented in the [dataflow process](/the-umarketingsuite-broad-overview/dataflow-pipeline/) there are different steps for [collecting](/the-umarketingsuite-broad-overview/dataflow-pipeline/data-collection/), [storing](/the-umarketingsuite-broad-overview/dataflow-pipeline/data-storage/), [parsing](/the-umarketingsuite-broad-overview/dataflow-pipeline/data-parsing/) and [reporting](/the-umarketingsuite-broad-overview/dataflow-pipeline/reporting/) the data. This is primarily done for performance reasons.
13+
As documented in the [dataflow process](../../../../the-umarketingsuite-broad-overview/dataflow-pipeline/) there are different steps for [collecting](../../../../the-umarketingsuite-broad-overview/dataflow-pipeline/data-collection/), [storing](../../../../the-umarketingsuite-broad-overview/dataflow-pipeline/data-storage/), [parsing](../../../../the-umarketingsuite-broad-overview/dataflow-pipeline/data-parsing/), and [reporting](../../../../the-umarketingsuite-broad-overview/dataflow-pipeline/reporting/) the data. This is primarily done for performance reasons.
1014

11-
### Data collection
15+
The collection is done in memory of the web server (or webservers if you have multiple web servers in a load-balanced
1216

13-
The collection is done in memory of the webserver (or webservers if you have multiple webservers in a [loadbalanced setup](https://our.umbraco.com/Documentation/Getting-Started/Setup/Server-Setup/Load-Balancing/)). This will have some impact on the available memory on the webserver but this is probably pretty limited. You can tweak the parameters '**FlushRateInRecords**' and '**FlushIntervalInSeconds**' in the [configuration file](/installing-umarketingsuite/configuration-options-1-x/), when you want to use more or less memory.
17+
Storing causes the data to flow from the memory to the database. The memory is free again and can be used for other data. The data is stored at that moment in the raw data tables.
1418

15-
Storing causes the data to flow from the memory to the database. The memory is free again and can be used for other data. The data is stored at that moment in the raw datatables.
19+
In our production websites we see that the average data size per record in the table `uMarketingSuiteAnalyticsRawPageView` is 0,9 kb. This means that every visitor stores 0,9 kb of data.
1620

17-
In our production websites we see that the average datasize per record in the table **uMarketingSuiteAnalyticsRawPageView** is 0,9 kb. This means that every visitor stores 0,9 kb data.
21+
For the `uMarketingSuiteRawClientSideData` it depends a bit on the implementation of the clientside events. If you track a lot of [custom events](../../../../the-umarketingsuite-broad-overview/dataflow-pipeline/data-collection/) this table will probably be bigger. On average we see that this is around 0,4 kb per visitor that can execute JavaScript (all bots are excluded because of this).
1822

19-
For the **uMarketingSuiteRawClientSideData** it depends a bit on the implementation of the clientside events. If you track a lot of [custom events](/the-umarketingsuite-broad-overview/dataflow-pipeline/data-collection/) this table will probably be bigger. On average we see that this is around 0,4 kb per visitor that can execute JavaScript (all bots are excluded because of this).
23+
This data can be found for your database with the following SQL Statement:
2024

21-
This data can be found for your own database with the following SQL Statement:
25+
```
26+
/***
27+
Copied and applied for the raw data tables from https://support.managed.com/kb/a227/how-to-find-large-tables-in-sql-database.aspx
28+
* Find the number of rows and the size of tables
29+
***/
2230
23-
/***
24-
Copied and applied for the raw datatables from https://support.managed.com/kb/a227/how-to-find-large-tables-in-sql-database.aspx
25-
* Find the number of rows and the size of tables
26-
***/
27-
28-
CREATE TABLE #temp (table_name sysname ,row_count INT,reserved_size VARCHAR(50),data_size VARCHAR(50),index_size VARCHAR(50),unused_size VARCHAR(50))SET NOCOUNT ONINSERT #tempEXEC sp_msforeachtable 'sp_spaceused ''?'''
31+
CREATE TABLE #temp (table_name sysname ,row_count INT,reserved_size VARCHAR(50),data_size VARCHAR(50),index_size VARCHAR(50),unused_size VARCHAR(50))SET NOCOUNT ONINSERT #tempEXEC sp_msforeachtable 'sp_spaceused ''?'''
2932
30-
SELECT a.table_name,a.row_count,COUNT(*) AS col_count,a.data_sizeFROM #temp aINNER JOIN information_schema.columns bON a.table_name collate database_default = b.table_name collate database_defaultOR REPLACE(REPLACE(a.table_name, '[dbo].[',''),']','') = b.table_name collate database_defaultWHERE a.table_name LIKE 'uMarketingSuite%raw%'GROUP BY a.table_name, a.row_count, a.data_sizeORDER BY CAST(REPLACE(a.data_size, ' KB', '') AS integer) DESC
33+
SELECT a.table_name,a.row_count,COUNT(*) AS col_count,a.data_sizeFROM #temp aINNER JOIN information_schema.columns bON a.table_name collate database_default = b.table_name collate database_defaultOR REPLACE(REPLACE(a.table_name, '[dbo].[',''),']','') = b.table_name collate database_defaultWHERE a.table_name LIKE 'uMarketingSuite%raw%'GROUP BY a.table_name, a.row_count, a.data_sizeORDER BY CAST(REPLACE(a.data_size, ' KB', '') AS integer) DESC
3134
32-
DROP TABLE #temp
35+
DROP TABLE #temp
36+
```
3337

3438
### Data parsing
3539

3640
In the data parsing the data is fetched from the raw data tables and stored in normalized tables. At that moment the raw data could be deleted and only the normalized data tables are needed. The data parsing is the heaviest step of the total process so this is where we put most of our performance TLC in.
3741

38-
The data parsing process runs in a background job on the webserver. Within [the configuration file](/installing-umarketingsuite/configuration-options-1-x/) you can specify how many records are fetched to parse and how often the process needs to run. It's also possible to specify which server(s) needs to be responsible for the parsing process.
42+
The data parsing process runs in a background job on the webserver. Within [the configuration file](../../../../installing-umarketingsuite/configuration-options-1-x/) you can specify how many records are fetched to parse and how often the process needs to run. It's also possible to specify which server(s) need to be responsible for the parsing process.
3943

4044
On average we see that the amount of stored data is only 0,1 kb per visit. This is only 10% of the original amount in the raw data tables.
4145

4246
The SQL Script for determining that is:
4347

44-
/***
45-
* Copied and applied for the uMarketingSuite datatables from https://support.managed.com/kb/a227/how-to-find-large-tables-in-sql-database.aspx
46-
* Find the number of rows and the size of tables
47-
***/
48-
49-
CREATE TABLE #temp (table_name sysname ,row_count INT,reserved_size VARCHAR(50),data_size VARCHAR(50),index_size VARCHAR(50),unused_size VARCHAR(50))SET NOCOUNT ONINSERT #tempEXEC sp_msforeachtable 'sp_spaceused ''?'''
48+
```
49+
/***
50+
* Copied and applied for the Umbraco uMS data tables from https://support.managed.com/kb/a227/how-to-find-large-tables-in-sql-database.aspx
51+
* Find the number of rows and the size of tables
52+
***/
53+
54+
CREATE TABLE #temp (table_name sysname ,row_count INT,reserved_size VARCHAR(50),data_size VARCHAR(50),index_size VARCHAR(50),unused_size VARCHAR(50))SET NOCOUNT ONINSERT #tempEXEC sp_msforeachtable 'sp_spaceused ''?'''
5055
51-
SELECT SUM(a.row_count) as [total number of rows],SUM(CAST(REPLACE(a.data_size, ' KB','') as integer)) as [total data size]FROM #temp aWHERE a.table_name LIKE 'uMarketingSuiteAnalytics%' AND NOT a.table_name LIKE 'uMarketingSuiteAnalytics%raw%'
56+
SELECT SUM(a.row_count) as [total number of rows],SUM(CAST(REPLACE(a.data_size, ' KB','') as integer)) as [total data size]FROM #temp aWHERE a.table_name LIKE 'uMarketingSuiteAnalytics%' AND NOT a.table_name LIKE 'uMarketingSuiteAnalytics%raw%'
5257
53-
SELECT a.table_name,a.row_count,COUNT(*) AS col_count,a.data_sizeFROM #temp aINNER JOIN information_schema.columns bON a.table_name collate database_default = b.table_name collate database_defaultOR REPLACE(REPLACE(a.table_name, '[dbo].[',''),']','') = b.table_name collate database_default WHERE a.table_name LIKE 'uMarketingSuiteAnalytics%' AND NOT a.table_name LIKE 'uMarketingSuiteAnalytics%raw%' GROUP BY a.table_name, a.row_count, a.data_sizeORDER BY CAST(REPLACE(a.data_size, ' KB', '') AS integer) DESC
58+
SELECT a.table_name,a.row_count,COUNT(*) AS col_count,a.data_sizeFROM #temp aINNER JOIN information_schema.columns bON a.table_name collate database_default = b.table_name collate database_defaultOR REPLACE(REPLACE(a.table_name, '[dbo].[',''),']','') = b.table_name collate database_default WHERE a.table_name LIKE 'uMarketingSuiteAnalytics%' AND NOT a.table_name LIKE 'uMarketingSuiteAnalytics%raw%' GROUP BY a.table_name, a.row_count, a.data_sizeORDER BY CAST(REPLACE(a.data_size, ' KB', '') AS integer) DESC
5459
55-
DROP TABLE #temp
60+
DROP TABLE #temp
61+
```
5662

5763
## Show me more numbers
5864

59-
With the two SQL scripts above you can find out how much data is used by the uMarketingSuite. If you want to see how long the processing step takes you can run this script to see the processing speed for the raw pageviews:
65+
With the two SQL scripts above you can find out how much data is used by the Umbraco uMS. If you want to see how long the processing step takes you can run this script to see the processing speed for the raw pageviews:
6066

61-
SELECT AVG(isnull(datediff(ms, processingStarted, processingFinished),0))
62-
, CAST(processingStarted as DATE)
63-
FROM [uMarketingSuiteAnalyticsRawPageView]
64-
WHERE processingstarted IS NOT NULL
65-
AND processingFinished IS NOT NULL
66-
AND processingFailed = 0
67-
GROUP BY CAST(processingStarted as DATE)
68-
ORDER BY CAST(processingStarted as DATE)
67+
```
68+
SELECT AVG(isnull(datediff(ms, processingStarted, processingFinished),0))
69+
, CAST(processingStarted as DATE)
70+
FROM [uMarketingSuiteAnalyticsRawPageView]
71+
WHERE processingstarted IS NOT NULL
72+
AND processingFinished IS NOT NULL
73+
AND processingFailed = 0
74+
GROUP BY CAST(processingStarted as DATE)
75+
ORDER BY CAST(processingStarted as DATE)
76+
```
6977

7078
and for the raw clientsidedata:
7179

72-
SELECT AVG(isnull(datediff(ms, processingStarted, processingFinished),0))
73-
, CAST(processingStarted as DATE)
74-
FROM [uMarketingSuiteAnalyticsRawClientSideData]
75-
WHERE processingstarted IS NOT NULL
76-
AND processingFinished IS NOT NULL
77-
AND processingFailed = 0
78-
GROUP BY CAST(processingStarted as DATE)
79-
ORDER BY CAST(processingStarted as DATE)
80+
```
81+
SELECT AVG(isnull(datediff(ms, processingStarted, processingFinished),0))
82+
, CAST(processingStarted as DATE)
83+
FROM [uMarketingSuiteAnalyticsRawClientSideData]
84+
WHERE processingstarted IS NOT NULL
85+
AND processingFinished IS NOT NULL
86+
AND processingFailed = 0
87+
GROUP BY CAST(processingStarted as DATE)
88+
ORDER BY CAST(processingStarted as DATE)
89+
```
8090

81-
We try to keep the average parsing **speed under the 100 ms**. Please let us know if you see anything different.
91+
We try to keep the average parsing **speed under 100 ms**. Please let us know if you see anything different.
8292

8393
## Optimized infrastructure
8494

8595
You can also optimize your server infrastructure to tweak the performance. There are a few options that you could apply:
8696

87-
- You could setup more webservers in [a loadbalanced setup](https://our.umbraco.com/Documentation/Getting-Started/Setup/Server-Setup/Load-Balancing/). Each of these webservers will collect data of the visitor, but you can specify in the configuration which webserver(s) is responsible for the parsing of the data. You could also setup one specific server only for parsing the data. In that case the other webservers will have almost no impact on their performance. To set this up you need to set the parameter '**IsProcessingServer**' to '**false**' in [your configuration file](/installing-umarketingsuite/settings-section/the-configuration-file/) for all servers that do not need to process the data and set it to '**true**' on the server(s) that is responsible for parsing. If there is not server with this setting set to '**true**' the raw data of the uMarketingSuite will take place, but the data will never be processed.
88-
- By default the uMarketingSuite stores its data in the same database as Umbraco. It uses the default connection string of Umbraco (named '**umbracoDbDSN**'). It is possible to specify a separate database for all uMarketingSuite data. This could be another database on the same server but also another databaseserver. To do this you need to specify a new connection string in your application and give that connectionstring a name. In [the configuration file](/installing-umarketingsuite/configuration-options-1-x/) you can now specify this name in the field '**DatabaseConnectionStringName**'.
97+
* You could set up more webservers in [a load-balanced setup](https://our.umbraco.com/Documentation/Getting-Started/Setup/Server-Setup/Load-Balancing/). Each of these web servers will collect data from the visitor, but you can specify in the configuration which web server (s) is responsible for the parsing of the data. You could also set up one specific server only for parsing the data. In that case, the other web servers will have almost no impact on their performance. To set this up you need to set the parameter '`IsProcessingServer`' to '`false`' in [your configuration file](../../../../installing-umarketingsuite/settings-section/the-configuration-file/) for all servers that do not need to process the data and set it to '`true`' on the server(s) that is responsible for parsing. If there is no server with this setting set to '`true`' the raw data of the Umbraco uMS will take place, but the data will never be processed.
98+
* By default the uMarketingSuite stores its data in the same database as Umbraco. It uses the default connection string of Umbraco (named '`umbracoDbDSN`'). It is possible to specify a separate database for all uMarketingSuite data. This could be another database on the same server but also another database server. To do this you need to specify a new connection string in your application and give that connection string a name. In [the configuration file](../../../../installing-umarketingsuite/configuration-options-1-x/), you can now specify this name in the field '`DatabaseConnectionStringName`'.
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
---
2-
description: Learn how the uMS cookie works and how the functionality can be tested
2+
description: Learn how the uMS cookie works and how the functionality can be tested.
33
---
44

5-
# Umbraco uMS Cookie
5+
# The uMS Cookie
66

77
When visiting a website with Umbraco uMS installed you will get a unique cookie. This cookie allows for relating different page visits or sessions to the same visitor. It will also continuously serve the same variant of an A/B test.
88

9-
By default the uMS cookie has the name `uMarketingSuiteAnalyticsVisitorId`. You can change the name in the [configuration file](../../../../installing-umarketingsuite/configuration-options-1-x/).
9+
By default the uMS cookie has the name `uMarketingSuiteAnalyticsVisitorId`. You can change the name in the [configuration file](../../../getting-started/for-developers/configuration-options-2-x.md).
1010

1111
The Umbraco uMS cookie:
1212

1313
* Is a first-party cookie. This means it is set by the website itself and can only be used by the website itself. The cookie will not track you across the whole internet on all kinds of websites (like Facebook and LinkedIn).
1414
* Sets the `HttpOnly` flag.
1515
* Sets the `Secure` flag.
16-
* Is initialized with an expiry date of **365 days** (depending on the settings in the configuration file) and has a sliding expiration. That means that if you revisit the website after 30 days, the cookie will reset and expire 365 days after that visit.
16+
* Is initialized with an expiry date of 365 days (depending on the settings in the configuration file) and has a sliding expiration. That means that if you revisit the website after 30 days, the cookie will reset and expire 365 days after that visit.
1717

1818
## Testing A/B variants
1919

20-
To test whether the A/B test is working and distributes the different variants you can use [the A/B test preview functionality](../../../../a-b-testing/previewing-an-a-b-test/). Delete the uMS cookie to become a _new visitor_ to the website and you can test whether it works .
20+
To test whether the A/B test is working and distributes the different variants you can use [the A/B test preview functionality](../../ab-testing/previewing-an-ab-test.md). Delete the uMS cookie to become a _new visitor_ to the website and you can test whether it works.
2121

2222
Consult your browser settings to learn how to delete the cookie.
2323

2424
## Overriding the default behavior
2525

26-
By default, all modules are initiated at the first-page request. If you want to override this behavior, read the documentation about the different [module permissions](../../../../the-umarketingsuite-broad-overview/the-umarketingsuite-cookie/module-permissions/).
26+
By default, all modules are initiated at the first page request. If you want to override this behavior, read the documentation about the different [module permissions](module-permissions.md).

0 commit comments

Comments
 (0)