I'm experiencing some weird stuff I think. I have a document type in the site where I have added a single textbox property.
I create a revision that only contains that doctype (no dependencies), and export to a file repository.
I then import the revision on my "prod" site, and execute the changes, which should just be updating on doctype. This however runs the CPU up to 85-95% utilization.
I cannot recreate this with a freshly created doctype. The doctype that is causing issues has a lot of content. Is courier doing anything regarding trying to update all the content nodes that this doctype has, or anything else that might be cpu intensive?
In another thread I read that ignoring these might help, but it did not seem to change anything for me:
Yes, because of the way umbraco works with property data, courier has to ensure that all properties have a row to contain any value in the cmspropertyData table
So if you have a doc type which is used alot, then yes it will have to insert a lot of rows, however, this shouldn't be that resource intensive, have you tried running a sql profiler? maybe nhibernate is doing a really crappy operation for each insert that we can optimize on
Ok, I attached the SQL Profiler, and it seems that the queries from Courier could be optimised a bit :-)
These are the two inserts made by the UI when changing a doctype manually. This is running fine and fast.:
exec sp_executesql N'INSERT INTO cmsPropertyType (DataTypeId, ContentTypeId, alias, name) VALUES (@DataTypeId, @ContentTypeId, @alias, @name)',N'@DataTypeId int,@ContentTypeId int,@alias nvarchar(8),@name nvarchar(8)',@DataTypeId=-88,@ContentTypeId=1083,@alias=N'newProp2',@name=N'NewProp2' exec sp_executesql N'insert into cmsPropertyData (contentNodeId, versionId, propertyTypeId) select contentId, versionId, 275 from cmsContent inner join cmsContentVersion on cmsContent.nodeId = cmsContentVersion.contentId where contentType = @contentTypeId',N'@contentTypeId int',@contentTypeId=1083
When Courier is updating the document type, it is first makin these three queris for every single node of that type:
exec sp_executesql N'SELECT umbraconod0_.id as id352_0_, umbraconod0_.createDate as createDate352_0_, umbraconod0_.level as level352_0_, umbraconod0_.nodeObjectType as nodeObje4_352_0_, umbraconod0_.nodeUser as nodeUser352_0_, umbraconod0_.path as path352_0_, umbraconod0_.sortOrder as sortOrder352_0_, umbraconod0_.text as text352_0_, umbraconod0_.trashed as trashed352_0_, umbraconod0_.uniqueID as uniqueID352_0_, umbraconod0_.parentID as parentID352_0_ FROM [umbracoNode] umbraconod0_ WHERE umbraconod0_.id=@p0',N'@p0 int',@p0=3340
exec sp_executesql N'SELECT this_.id as id323_0_, this_.VersionDate as VersionD2_323_0_, this_.ContentId as ContentId323_0_, this_.VersionId as VersionId323_0_ FROM [cmsContentVersion] this_ WHERE this_.ContentId = @p0 ORDER BY this_.id desc',N'@p0 int',@p0=3340
exec sp_executesql N'SELECT this_.versionId as versionId328_0_, this_.alias as alias328_0_, this_.documentUser as document3_328_0_, this_.expireDate as expireDate328_0_, this_.newest as newest328_0_, this_.published as published328_0_, this_.releaseDate as releaseD7_328_0_, this_.templateId as templateId328_0_, this_.text as text328_0_, this_.updateDate as updateDate328_0_, this_.nodeId as nodeId328_0_ FROM [cmsDocument] this_ WHERE this_.versionId = @p0',N'@p0 uniqueidentifier',@p0='C9919C98-B5AB-4819-B218-32D0199E2A50'
After doing that for a while, it creates inserts for every node:
Sorry, the question was not regarding the exceptions in 2.5, but the topic of the original post, where adding a property to a document type will load each document into memory and change it, instead of doing a batch update the same way that the backend code does.
The problem is that if we were to deploy using courier right now, it would take 20 minutes x the number of properties, because of a large number of content nodes. And we really want to start using it for our production deployments :)
Heavy CPU usage on single doctype update
I'm experiencing some weird stuff I think. I have a document type in the site where I have added a single textbox property.
I create a revision that only contains that doctype (no dependencies), and export to a file repository.
I then import the revision on my "prod" site, and execute the changes, which should just be updating on doctype. This however runs the CPU up to 85-95% utilization.
I cannot recreate this with a freshly created doctype. The doctype that is causing issues has a lot of content. Is courier doing anything regarding trying to update all the content nodes that this doctype has, or anything else that might be cpu intensive?
In another thread I read that ignoring these might help, but it did not seem to change anything for me:
An update on this.
I let the process sit for a while an after about 30 minutes or so, it actually finishedm and the new property is now on my doctype.
Is there anyway that we can configure this to not take as long? Maybe there are other namespaces we could ignore to get less intensive operations?
Hi Morten
Yes, because of the way umbraco works with property data, courier has to ensure that all properties have a row to contain any value in the cmspropertyData table
So if you have a doc type which is used alot, then yes it will have to insert a lot of rows, however, this shouldn't be that resource intensive, have you tried running a sql profiler? maybe nhibernate is doing a really crappy operation for each insert that we can optimize on
/Per
oh, and no if it's the row insertion that is taking this long, then no, you cannot turn that off, as it would kill your site
Ok, I attached the SQL Profiler, and it seems that the queries from Courier could be optimised a bit :-)
These are the two inserts made by the UI when changing a doctype manually. This is running fine and fast.:
When Courier is updating the document type, it is first makin these three queris for every single node of that type:
After doing that for a while, it creates inserts for every node:
So I guess that this could be optimised pretty heavily :-)
The selects are the worst. They take around 22 minutes. The inserts only take around 10 seconds.
ouch! thanks for the info, will make sure to do some optimization on that
Has there been progress on this in the latest updates? I'm not sure where I can find a changelog for the courier updates :-)
I tried installing version 2.5 alpha on my system, but it caused some exceptions.
Will the 2.5 version solve this issue? It doesn't seem to be noted in the changelog?
Morten, its really hard to answer your question, when you do no actually post the exceptions
Sorry, the question was not regarding the exceptions in 2.5, but the topic of the original post, where adding a property to a document type will load each document into memory and change it, instead of doing a batch update the same way that the backend code does.
The problem is that if we were to deploy using courier right now, it would take 20 minutes x the number of properties, because of a large number of content nodes. And we really want to start using it for our production deployments :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.