extent0.dbf grows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

extent0.dbf grows

GLASS mailing list
Ciao,

i have a deployment system based on GemStone version '3.1.0.6'


Now i use Gemtools and todeClient to do some works on the repository:  update code,  save repository .....


When i login with the tools  i note the repository grows significantly,  and also, the relative  full backups grows significantly.

To reset the system i need to clear the Object Log with the relative clear command  ( ol clear in tode ) 


After 1 hour ,  because i have active the #WAGemStoneMaintenanceTask 

A) the system recovers the free space

B) the relative full backups become small

But now i have an extent0.dbf   of   5 991 563 264   with a freeSpace of 5 267 701 760.

It is not a very good situation.

Questions:

1) what should I do with the tools to not increase the size of the relative extent ?

I need to operate with the tools  when the seasideGems30 are down ?


2) to resize the extent i need to do a full backup and restoring into a virgin extent?


3) there is possibility of directly reducing the extent file ?


Thanks for any considerations,


Dario

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: extent0.dbf grows

GLASS mailing list

On Jul 31, 2015, at 3:37 AM, Trussardi Dario Romano via Glass <[hidden email]> wrote:

Ciao,

i have a deployment system based on GemStone version '3.1.0.6'


Now i use Gemtools and todeClient to do some works on the repository:  update code,  save repository .....


When i login with the tools  i note the repository grows significantly,  and also, the relative  full backups grows significantly.

To reset the system i need to clear the Object Log with the relative clear command  ( ol clear in tode ) 

Do you think that the Object Log grows significantly during your time logged in with the tools? What is its size at the beginning and end of your session?

After 1 hour ,  because i have active the #WAGemStoneMaintenanceTask 

A) the system recovers the free space

B) the relative full backups become small

But now i have an extent0.dbf   of   5 991 563 264   with a freeSpace of 5 267 701 760.

It is not a very good situation.

Why? Having empty space in the repository (extents) isn’t really much worse than having empty (unused) space in the file system. 

Questions:

1) what should I do with the tools to not increase the size of the relative extent ?

I need to operate with the tools  when the seasideGems30 are down ?

The most common cause of unexpected repository growth is a commit record (CR) backlog. If you log in a session and do not commit while other sessions do commits, then you get a CR backlog. You should ensure that each login, including tools, does a regular commit.

2) to resize the extent i need to do a full backup and restoring into a virgin extent?

Yes. See https://downloads.gemtalksystems.com/docs/GemStone64/3.2.x/GS64-SysAdmin-3.2/GS64-SysAdmin-3.2.htm?https://downloads.gemtalksystems.com/docs/GemStone64/3.2.x/GS64-SysAdmin-3.2/7-RepositorySpace.htm#pgfId-82473.

3) there is possibility of directly reducing the extent file ?

Repository>>#’shrinkExtents’ might be worth a try, but it is so rarely useful that it has been deprecated.

Thanks for any considerations,


Dario

James


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: extent0.dbf grows

GLASS mailing list
In reply to this post by GLASS mailing list

On Fri, Jul 31, 2015 at 7:37 AM, Trussardi Dario Romano via Glass <[hidden email]> wrote:
Ciao,

i have a deployment system based on GemStone version '3.1.0.6'


Now i use Gemtools and todeClient to do some works on the repository:  update code,  save repository .....


When i login with the tools  i note the repository grows significantly,  and also, the relative  full backups grows significantly.

To reset the system i need to clear the Object Log with the relative clear command  ( ol clear in tode ) 


After 1 hour ,  because i have active the #WAGemStoneMaintenanceTask 

A) the system recovers the free space

B) the relative full backups become small

But now i have an extent0.dbf   of   5 991 563 264   with a freeSpace of 5 267 701 760.

It is not a very good situation.

Questions:

1) what should I do with the tools to not increase the size of the relative extent ?

I need to operate with the tools  when the seasideGems30 are down ?


Sometimes I found that keeping a GemTools session opened would complicate a bit the voting of the MFC...so try to have at least GemTools off when running MFC (in your case via WAGemStoneMaintenanceTask).
Also..note that depending on the size of the repository, the cpu, etc, the MFC could take quite some time, affecting performance of current users. And if you do it every hour it might be too much. 

Also...for the conf file of the seaside gems, I recommend you either:

1) GEM_TEMPOBJ_POMGEN_PRUNE_ON_VOTE to 100%   (change  /opt/gemstone/product/seaside/etc/seaside30.conf in your case)
2) or recycle seaside gems before starting MFC (stop and start seaside gems again)

Another thing I would take into account is enabling epochGC. See the admin guide for details. But if you do so, then do not run MFC every hour since it may be overkilling. I would do it..max...once  day...


 

2) to resize the extent i need to do a full backup and restoring into a virgin extent?



Yes, I do that, but not daily not even automatically. Once (with human review) I note that my extent is much larger than it should normally need, I shrink it. But note if you shrink it and then it needs to grow, the grow operation is slow and hence has impact in current users. So... if you extent free space goes and come back, do not shrink it. If the extent has a lot of free space that doesn't seem to be used at any moment, and it is significant, then I would shrink it (only if disk space is a problem). 

I have made an script for compacting the extent which I shared it in this thread: http://forum.world.st/Cannot-make-full-backup-restore-to-work-tp4836094p4836237.html
 
3) there is possibility of directly reducing the extent file ?


Not that I am aware of. 
 

Thanks for any considerations,


Dario

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: extent0.dbf grows

GLASS mailing list
In reply to this post by GLASS mailing list

James,


On Jul 31, 2015, at 3:37 AM, Trussardi Dario Romano via Glass <[hidden email]> wrote:

Ciao,

i have a deployment system based on GemStone version '3.1.0.6'


Now i use Gemtools and todeClient to do some works on the repository:  update code,  save repository .....


When i login with the tools  i note the repository grows significantly,  and also, the relative  full backups grows significantly.

To reset the system i need to clear the Object Log with the relative clear command  ( ol clear in tode ) 

Do you think that the Object Log grows significantly during your time logged in with the tools? What is its size at the beginning and end of your session?

I don't have real data about the extent0.dbf change size from beginning and end of a gemtools session.

But the full backup size  before Object Log  clear is :  4 258 529280

after Object Log clear is: 1 376 124 928

The SystemRepository freeSpace size before Object Log clear is :  1 092 419 584

after Object Log clear ( and one hour  of system background works )  is:  5 267 701 760



After 1 hour ,  because i have active the #WAGemStoneMaintenanceTask 

A) the system recovers the free space

B) the relative full backups become small

But now i have an extent0.dbf   of   5 991 563 264   with a freeSpace of 5 267 701 760.

It is not a very good situation.

Why? Having empty space in the repository (extents) isn’t really much worse than having empty (unused) space in the file system. 

Yes, but if i do copy of extent0.dbf  the relative size is significant.


Questions:

1) what should I do with the tools to not increase the size of the relative extent ?

I need to operate with the tools  when the seasideGems30 are down ?

The most common cause of unexpected repository growth is a commit record (CR) backlog. If you log in a session and do not commit while other sessions do commits, then you get a CR backlog. You should ensure that each login, including tools, does a regular commit.

When i works with Gemtools i don't do regular commit or abort .

Is't  a wrong practice?

After any command into Gemtools workspace is good practice do a commit or abort command ?

3) there is possibility of directly reducing the extent file ?

Repository>>#’shrinkExtents’ might be worth a try, but it is so rarely useful that it has been deprecated.

Thanks for any considerations,


Dario

James

Thanks,

Dario




_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: extent0.dbf grows

GLASS mailing list

On Jul 31, 2015, at 8:58 AM, Trussardi Dario Romano via Glass <[hidden email]> wrote:

James,


On Jul 31, 2015, at 3:37 AM, Trussardi Dario Romano via Glass <[hidden email]> wrote:

Ciao,

i have a deployment system based on GemStone version '3.1.0.6'


Now i use Gemtools and todeClient to do some works on the repository:  update code,  save repository .....


When i login with the tools  i note the repository grows significantly,  and also, the relative  full backups grows significantly.

To reset the system i need to clear the Object Log with the relative clear command  ( ol clear in tode ) 

Do you think that the Object Log grows significantly during your time logged in with the tools? What is its size at the beginning and end of your session?

I don't have real data about the extent0.dbf change size from beginning and end of a gemtools session.

But the full backup size  before Object Log  clear is :  4 258 529280

after Object Log clear is: 1 376 124 928

The SystemRepository freeSpace size before Object Log clear is :  1 092 419 584

after Object Log clear ( and one hour  of system background works )  is:  5 267 701 760

This tells me that your ObjectLog is large and when you clear it you get back a lot of space. No surprise there! So why is the ObjectLog large? What are the entries in the log? Are there a lot of errors? You said, "When i login with the tools  i note the repository grows significantly.” If you don’t "login with the tools" does the repository still grow? Do you think that your login is contributing to growth of the ObjectLog? If so, what are the entries in the log and why are they there?


After 1 hour ,  because i have active the #WAGemStoneMaintenanceTask 

A) the system recovers the free space

B) the relative full backups become small

But now i have an extent0.dbf   of   5 991 563 264   with a freeSpace of 5 267 701 760.

It is not a very good situation.

Why? Having empty space in the repository (extents) isn’t really much worse than having empty (unused) space in the file system. 

Yes, but if i do copy of extent0.dbf  the relative size is significant.

True. Do you need to make copies of the extent? If so, then shrinking it is certainly helpful.



Questions:

1) what should I do with the tools to not increase the size of the relative extent ?

I need to operate with the tools  when the seasideGems30 are down ?

The most common cause of unexpected repository growth is a commit record (CR) backlog. If you log in a session and do not commit while other sessions do commits, then you get a CR backlog. You should ensure that each login, including tools, does a regular commit.

When i works with Gemtools i don't do regular commit or abort .

Is't  a wrong practice?

After any command into Gemtools workspace is good practice do a commit or abort command ?

As I said above, you should ensure that each login, including tools, does a regular commit. I’ll let those with more experience with GemTools explain how to do it (I use Topaz and Jade). If nothing else, execute ‘System commitTransaction’ and ensure that you get back ‘true’ as the result.


3) there is possibility of directly reducing the extent file ?

Repository>>#’shrinkExtents’ might be worth a try, but it is so rarely useful that it has been deprecated.

Thanks for any considerations,


Dario

James

Thanks,

Dario

James


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: extent0.dbf grows

GLASS mailing list
In reply to this post by GLASS mailing list


On 07/31/2015 08:58 AM, Trussardi Dario Romano via Glass wrote:

James,


On Jul 31, 2015, at 3:37 AM, Trussardi Dario Romano via Glass <[hidden email]> wrote:

Ciao,

i have a deployment system based on GemStone version '3.1.0.6'


Now i use Gemtools and todeClient to do some works on the repository:  update code,  save repository .....


When i login with the tools  i note the repository grows significantly,  and also, the relative  full backups grows significantly.

To reset the system i need to clear the Object Log with the relative clear command  ( ol clear in tode ) 

Do you think that the Object Log grows significantly during your time logged in with the tools? What is its size at the beginning and end of your session?

I don't have real data about the extent0.dbf change size from beginning and end of a gemtools session.

But the full backup size  before Object Log  clear is :  4 258 529280

after Object Log clear is: 1 376 124 928

The SystemRepository freeSpace size before Object Log clear is :  1 092 419 584

after Object Log clear ( and one hour  of system background works )  is:  5 267 701 760


Okay as James has mentioned, it definitely looks like the Object Log is the source of the "excess data" ... it would be interesting to understand what is in the object log ... My guess would be that you are having recurring errors and the continuations created to record those errors can easily cause a bunch of data to be stored in your extent ... if the errors are providing useful data, than this can be viewed as a "cost of doing business" and you will just need to have a regularly scheduled task for clearing the object log ... you could arrange to regularly clear continuation entries from the object log that are more than a day or week or ? old then at least you would expect to reach a steady state for extent size ... then you would only need to consider shrinking the size of the extent when you had an anomaly where a series of unexpected errors cropped up ....

As Mariano and James point out, there are other possible sources of extent growth that are related to a commit record backlog because you have a GemTools/tODE/topaz session open (and idle) on a production system that is "busy committing" ... commit record backlog data is transient data that is stored in the extent and will cause the extent to grow, but once the session or sessions causing the commit record backlog log out commit or abort, the transient data is no longer needed by the system and will "magically turn into free space" at checkpoint boundaries ....

The key point here is that object log data is persistent "user data" and will not turn into free space until 1) you break the link to the persistent root (object log clear) and 2) you run an MFC. Commit record backlog data "system data" and will turn into free space as soon as the sessions abort/commit/logout and a checkpoint is hit, i.e., no MFC is needed ... The default checkpoint interval is 5 minutes I think ...

Dale

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: extent0.dbf grows

GLASS mailing list


On Wed, Aug 5, 2015 at 5:41 PM, Dale Henrichs via Glass <[hidden email]> wrote:


On 07/31/2015 08:58 AM, Trussardi Dario Romano via Glass wrote:

James,


On Jul 31, 2015, at 3:37 AM, Trussardi Dario Romano via Glass <[hidden email]> wrote:

Ciao,

i have a deployment system based on GemStone version '3.1.0.6'


Now i use Gemtools and todeClient to do some works on the repository:  update code,  save repository .....


When i login with the tools  i note the repository grows significantly,  and also, the relative  full backups grows significantly.

To reset the system i need to clear the Object Log with the relative clear command  ( ol clear in tode ) 

Do you think that the Object Log grows significantly during your time logged in with the tools? What is its size at the beginning and end of your session?

I don't have real data about the extent0.dbf change size from beginning and end of a gemtools session.

But the full backup size  before Object Log  clear is :  4 258 529280

after Object Log clear is: 1 376 124 928

The SystemRepository freeSpace size before Object Log clear is :  1 092 419 584

after Object Log clear ( and one hour  of system background works )  is:  5 267 701 760


Okay as James has mentioned, it definitely looks like the Object Log is the source of the "excess data" ... it would be interesting to understand what is in the object log ... My guess would be that you are having recurring errors and the continuations created to record those errors can easily cause a bunch of data to be stored in your extent ... if the errors are providing useful data, than this can be viewed as a "cost of doing business" and you will just need to have a regularly scheduled task for clearing the object log ... you could arrange to regularly clear continuation entries from the object log that are more than a day or week or ? old then at least you would expect to reach a steady state for extent size ... then you would only need to consider shrinking the size of the extent when you had an anomaly where a series of unexpected errors cropped up ....


I do exactly that as part of my daily cleaning:


cleanObjectLogEntriesDaysAgo: aNumberOfDays
| log |
log := self objectLogEntries: true.
(log select: [:ea | (Date today - ea stamp asDate) asDays >= aNumberOfDays ]) do: [:ea | log remove: ea ifAbsent: []].
System commitTransaction.


objectLogEntries: shouldLock

shouldLock 
ifTrue: [
System writeLock: ObjectLogEntry objectQueue
ifDenied: [ 
Transcript show: 'ObjectLogEntry objectQueue lock denied'.
^ nil
]
ifChanged: [ 
System addToCommitOrAbortReleaseLocksSet: ObjectLogEntry objectQueue.
Transcript show: 'ObjectLogEntry objectQueue lock dirty'.
^ nil
].
System addToCommitOrAbortReleaseLocksSet: ObjectLogEntry objectQueue].
^ObjectLogEntry objectLog


Maybe we could add this directly to class side of ObjectLogEntry so that others can benefit from it?
 

 
As Mariano and James point out, there are other possible sources of extent growth that are related to a commit record backlog because you have a GemTools/tODE/topaz session open (and idle) on a production system that is "busy committing" ... commit record backlog data is transient data that is stored in the extent and will cause the extent to grow, but once the session or sessions causing the commit record backlog log out commit or abort, the transient data is no longer needed by the system and will "magically turn into free space" at checkpoint boundaries ....

The key point here is that object log data is persistent "user data" and will not turn into free space until 1) you break the link to the persistent root (object log clear) and 2) you run an MFC. Commit record backlog data "system data" and will turn into free space as soon as the sessions abort/commit/logout and a checkpoint is hit, i.e., no MFC is needed ... The default checkpoint interval is 5 minutes I think ...


Dale, it is not clear to me what the checkpoint interval is. I understood it was at abort/commit/logout..so how is this internal related? Is there a way I can check the stone configuration parameter of this (the 5 minutes)?

So for the "system data" to turn into free space, the other gems need to abort/commit/logout AND only after 5 minutes that turning into free space will happen?   I ask because I am scheduling some batch jobs running at night, and as soon as they all finish, I run GC...and sometimes it seems I do not really GC what I should have...

Thanks!



--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

ObjectLog cleanup

GLASS mailing list
Here is my script...


cleanupObjectLog

  | log date1 date2 sortedCopy count |
  log := ObjectLogEntry objectLog.

“keep only one per day of various maintenance tasks (useful to go back years on size!)"
  #('MTCE: Repository Size' 'MTCE: MFC' 'MTCE: expired sessions') do: [:eachLabel | 
  log copy do: [:each | 
  each label = eachLabel ifTrue: [
  each stamp date = date1 ifTrue: [
  log remove: each.
  ] ifFalse: [
  date1 := each stamp date.
  ].
  ].
  ].
  ].

“Keep only one per week of anything more than a month old"
  date1 := Date today subtractDays: 30.
  log copy do: [:each | 
  (each stamp date < date1 and: [each stamp date day \\ 7 ~= 0]) ifTrue: [
  log remove: each.
  ].
  ].

“keep only last three days of session expiration"
  date1 := Date today subtractDays: 3.
  log copy do: [:each | 
  (each stamp date < date1 and: [each label = 'MTCE: expired sessions']) ifTrue: [
  log remove: each.
  ].
  ].

“keep only five per day of lock failures"
date1 := nil.
log copy do: [:each | 
each stamp date = date1 ifTrue: [
each label = 'Lock not acquired - retrying' ifTrue: [
count < 5 ifTrue: [
count := count + 1.
] ifFalse: [
log remove: each.
].
].
] ifFalse: [
date1 := each stamp date.
count := 0.
].
].

“beyond ten days keep only twenty errors per day"
date1 := nil.
  date2 := Date today subtractDays: 10.
log copy do: [:each | 
each stamp date = date1 ifTrue: [
each priority == 2 ifTrue: [
count < 20 ifTrue: [
count := count + 1.
] ifFalse: [
date1 < date2 ifTrue: [
log remove: each.
].
].
].
] ifFalse: [
date1 := each stamp date.
count := 0.
].
].

  sortedCopy := log asSortedCollection: [:a :b | 
  a priority > b priority or: [
  a priority = b priority and: [a stamp < b stamp].
  ].
  ].
  log 
  size: 0;
  addAll: sortedCopy asOrderedCollection;
yourself.
%

On Aug 5, 2015, at 2:33 PM, Mariano Martinez Peck via Glass <[hidden email]> wrote:



On Wed, Aug 5, 2015 at 5:41 PM, Dale Henrichs via Glass <[hidden email]> wrote:


On 07/31/2015 08:58 AM, Trussardi Dario Romano via Glass wrote:

James,


On Jul 31, 2015, at 3:37 AM, Trussardi Dario Romano via Glass <[hidden email]> wrote:

Ciao,

i have a deployment system based on GemStone version '3.1.0.6'


Now i use Gemtools and todeClient to do some works on the repository:  update code,  save repository .....


When i login with the tools  i note the repository grows significantly,  and also, the relative  full backups grows significantly.

To reset the system i need to clear the Object Log with the relative clear command  ( ol clear in tode ) 

Do you think that the Object Log grows significantly during your time logged in with the tools? What is its size at the beginning and end of your session?

I don't have real data about the extent0.dbf change size from beginning and end of a gemtools session.

But the full backup size  before Object Log  clear is :  4 258 529280

after Object Log clear is: 1 376 124 928

The SystemRepository freeSpace size before Object Log clear is :  1 092 419 584

after Object Log clear ( and one hour  of system background works )  is:  5 267 701 760


Okay as James has mentioned, it definitely looks like the Object Log is the source of the "excess data" ... it would be interesting to understand what is in the object log ... My guess would be that you are having recurring errors and the continuations created to record those errors can easily cause a bunch of data to be stored in your extent ... if the errors are providing useful data, than this can be viewed as a "cost of doing business" and you will just need to have a regularly scheduled task for clearing the object log ... you could arrange to regularly clear continuation entries from the object log that are more than a day or week or ? old then at least you would expect to reach a steady state for extent size ... then you would only need to consider shrinking the size of the extent when you had an anomaly where a series of unexpected errors cropped up ....


I do exactly that as part of my daily cleaning:


cleanObjectLogEntriesDaysAgo: aNumberOfDays
| log |
log := self objectLogEntries: true.
(log select: [:ea | (Date today - ea stamp asDate) asDays >= aNumberOfDays ]) do: [:ea | log remove: ea ifAbsent: []].
System commitTransaction.


objectLogEntries: shouldLock

shouldLock 
ifTrue: [
System writeLock: ObjectLogEntry objectQueue
ifDenied: [ 
Transcript show: 'ObjectLogEntry objectQueue lock denied'.
^ nil
]
ifChanged: [ 
System addToCommitOrAbortReleaseLocksSet: ObjectLogEntry objectQueue.
Transcript show: 'ObjectLogEntry objectQueue lock dirty'.
^ nil
].
System addToCommitOrAbortReleaseLocksSet: ObjectLogEntry objectQueue].
^ObjectLogEntry objectLog


Maybe we could add this directly to class side of ObjectLogEntry so that others can benefit from it?
 

 
As Mariano and James point out, there are other possible sources of extent growth that are related to a commit record backlog because you have a GemTools/tODE/topaz session open (and idle) on a production system that is "busy committing" ... commit record backlog data is transient data that is stored in the extent and will cause the extent to grow, but once the session or sessions causing the commit record backlog log out commit or abort, the transient data is no longer needed by the system and will "magically turn into free space" at checkpoint boundaries ....

The key point here is that object log data is persistent "user data" and will not turn into free space until 1) you break the link to the persistent root (object log clear) and 2) you run an MFC. Commit record backlog data "system data" and will turn into free space as soon as the sessions abort/commit/logout and a checkpoint is hit, i.e., no MFC is needed ... The default checkpoint interval is 5 minutes I think ...


Dale, it is not clear to me what the checkpoint interval is. I understood it was at abort/commit/logout..so how is this internal related? Is there a way I can check the stone configuration parameter of this (the 5 minutes)?

So for the "system data" to turn into free space, the other gems need to abort/commit/logout AND only after 5 minutes that turning into free space will happen?   I ask because I am scheduling some batch jobs running at night, and as soon as they all finish, I run GC...and sometimes it seems I do not really GC what I should have...

Thanks!



--
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: extent0.dbf grows

GLASS mailing list
In reply to this post by GLASS mailing list


On 08/05/2015 02:33 PM, Mariano Martinez Peck wrote:


On Wed, Aug 5, 2015 at 5:41 PM, Dale Henrichs via Glass <[hidden email]> wrote:


On 07/31/2015 08:58 AM, Trussardi Dario Romano via Glass wrote:

James,


On Jul 31, 2015, at 3:37 AM, Trussardi Dario Romano via Glass <[hidden email]> wrote:

Ciao,

i have a deployment system based on GemStone version '3.1.0.6'


Now i use Gemtools and todeClient to do some works on the repository:  update code,  save repository .....


When i login with the tools  i note the repository grows significantly,  and also, the relative  full backups grows significantly.

To reset the system i need to clear the Object Log with the relative clear command  ( ol clear in tode ) 

Do you think that the Object Log grows significantly during your time logged in with the tools? What is its size at the beginning and end of your session?

I don't have real data about the extent0.dbf change size from beginning and end of a gemtools session.

But the full backup size  before Object Log  clear is :  4 258 529280

after Object Log clear is: 1 376 124 928

The SystemRepository freeSpace size before Object Log clear is :  1 092 419 584

after Object Log clear ( and one hour  of system background works )  is:  5 267 701 760


Okay as James has mentioned, it definitely looks like the Object Log is the source of the "excess data" ... it would be interesting to understand what is in the object log ... My guess would be that you are having recurring errors and the continuations created to record those errors can easily cause a bunch of data to be stored in your extent ... if the errors are providing useful data, than this can be viewed as a "cost of doing business" and you will just need to have a regularly scheduled task for clearing the object log ... you could arrange to regularly clear continuation entries from the object log that are more than a day or week or ? old then at least you would expect to reach a steady state for extent size ... then you would only need to consider shrinking the size of the extent when you had an anomaly where a series of unexpected errors cropped up ....


I do exactly that as part of my daily cleaning:


cleanObjectLogEntriesDaysAgo: aNumberOfDays
| log |
log := self objectLogEntries: true.
(log select: [:ea | (Date today - ea stamp asDate) asDays >= aNumberOfDays ]) do: [:ea | log remove: ea ifAbsent: []].
System commitTransaction.


objectLogEntries: shouldLock

shouldLock 
ifTrue: [
System writeLock: ObjectLogEntry objectQueue
ifDenied: [ 
Transcript show: 'ObjectLogEntry objectQueue lock denied'.
^ nil
]
ifChanged: [ 
System addToCommitOrAbortReleaseLocksSet: ObjectLogEntry objectQueue.
Transcript show: 'ObjectLogEntry objectQueue lock dirty'.
^ nil
].
System addToCommitOrAbortReleaseLocksSet: ObjectLogEntry objectQueue].
^ObjectLogEntry objectLog


Maybe we could add this directly to class side of ObjectLogEntry so that others can benefit from it?
If you could submit an issue with this code against GsDevKit[1] that would help me keep track ...

Even better a pull request against the glassdb/glass repo[2] would make sure that the code was immediately available ...

Since I see that James has some code as well, perhaps opening an issue would be best. We could discuss the code in more detail and perhaps incorporate the ideas from both of your scripts ...

Dale

[1] https://github.com/GsDevKit/GsDevKit/issues/new
[2] https://github.com/glassdb/glass/pulls
 


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: ObjectLog cleanup

GLASS mailing list
In reply to this post by GLASS mailing list

On Wed, Aug 5, 2015 at 6:48 PM, James Foster <[hidden email]> wrote:
Here is my script...


Thanks for sharing your script James. I answer inline below some questions. 
 

cleanupObjectLog

  | log date1 date2 sortedCopy count |
  log := ObjectLogEntry objectLog.

“keep only one per day of various maintenance tasks (useful to go back years on size!)"
  #('MTCE: Repository Size' 'MTCE: MFC' 'MTCE: expired sessions') do: [:eachLabel | 
  log copy do: [:each | 
  each label = eachLabel ifTrue: [
  each stamp date = date1 ifTrue: [
  log remove: each.
  ] ifFalse: [
  date1 := each stamp date.
  ].
  ].
  ].
  ].


Good!

 

“Keep only one per week of anything more than a month old"
  date1 := Date today subtractDays: 30.
  log copy do: [:each | 
  (each stamp date < date1 and: [each stamp date day \\ 7 ~= 0]) ifTrue: [
  log remove: each.
  ].
  ].



This is the part I understand the less. Why would make sense to keep one random entry once per week of things older than a month? 
I mean...a random entry will probably tell me anything. In which case do you think this could be useful?

 
“keep only last three days of session expiration"
  date1 := Date today subtractDays: 3.
  log copy do: [:each | 
  (each stamp date < date1 and: [each label = 'MTCE: expired sessions']) ifTrue: [
  log remove: each.
  ].
  ].



Good!

 
“keep only five per day of lock failures"
date1 := nil.
log copy do: [:each | 
each stamp date = date1 ifTrue: [
each label = 'Lock not acquired - retrying' ifTrue: [
count < 5 ifTrue: [
count := count + 1.
] ifFalse: [
log remove: each.
].
].
] ifFalse: [
date1 := each stamp date.
count := 0.
].
].

Good!

 

“beyond ten days keep only twenty errors per day"
date1 := nil.
  date2 := Date today subtractDays: 10.
log copy do: [:each | 
each stamp date = date1 ifTrue: [
each priority == 2 ifTrue: [
count < 20 ifTrue: [
count := count + 1.
] ifFalse: [
date1 < date2 ifTrue: [
log remove: each.
].
].
].
] ifFalse: [
date1 := each stamp date.
count := 0.
].
].


Good.

 
  sortedCopy := log asSortedCollection: [:a :b | 
  a priority > b priority or: [
  a priority = b priority and: [a stamp < b stamp].
  ].
  ].
  log 
  size: 0;
  addAll: sortedCopy asOrderedCollection;
yourself.

A couple of questions:

1) Don't you need to get the lock (as I did in my script) before trying to write the object log?
 
2) I also have some Transcript show (priority 7), some inspect/explore (priority 8) and some trace:  (priority 6).  I guess I should add a similar part for this...not sure how many days though... 

Thanks in advance,

 
%

On Aug 5, 2015, at 2:33 PM, Mariano Martinez Peck via Glass <[hidden email]> wrote:



On Wed, Aug 5, 2015 at 5:41 PM, Dale Henrichs via Glass <[hidden email]> wrote:


On 07/31/2015 08:58 AM, Trussardi Dario Romano via Glass wrote:

James,


On Jul 31, 2015, at 3:37 AM, Trussardi Dario Romano via Glass <[hidden email]> wrote:

Ciao,

i have a deployment system based on GemStone version '3.1.0.6'


Now i use Gemtools and todeClient to do some works on the repository:  update code,  save repository .....


When i login with the tools  i note the repository grows significantly,  and also, the relative  full backups grows significantly.

To reset the system i need to clear the Object Log with the relative clear command  ( ol clear in tode ) 

Do you think that the Object Log grows significantly during your time logged in with the tools? What is its size at the beginning and end of your session?

I don't have real data about the extent0.dbf change size from beginning and end of a gemtools session.

But the full backup size  before Object Log  clear is :  4 258 529280

after Object Log clear is: 1 376 124 928

The SystemRepository freeSpace size before Object Log clear is :  1 092 419 584

after Object Log clear ( and one hour  of system background works )  is:  5 267 701 760


Okay as James has mentioned, it definitely looks like the Object Log is the source of the "excess data" ... it would be interesting to understand what is in the object log ... My guess would be that you are having recurring errors and the continuations created to record those errors can easily cause a bunch of data to be stored in your extent ... if the errors are providing useful data, than this can be viewed as a "cost of doing business" and you will just need to have a regularly scheduled task for clearing the object log ... you could arrange to regularly clear continuation entries from the object log that are more than a day or week or ? old then at least you would expect to reach a steady state for extent size ... then you would only need to consider shrinking the size of the extent when you had an anomaly where a series of unexpected errors cropped up ....


I do exactly that as part of my daily cleaning:


cleanObjectLogEntriesDaysAgo: aNumberOfDays
| log |
log := self objectLogEntries: true.
(log select: [:ea | (Date today - ea stamp asDate) asDays >= aNumberOfDays ]) do: [:ea | log remove: ea ifAbsent: []].
System commitTransaction.


objectLogEntries: shouldLock

shouldLock 
ifTrue: [
System writeLock: ObjectLogEntry objectQueue
ifDenied: [ 
Transcript show: 'ObjectLogEntry objectQueue lock denied'.
^ nil
]
ifChanged: [ 
System addToCommitOrAbortReleaseLocksSet: ObjectLogEntry objectQueue.
Transcript show: 'ObjectLogEntry objectQueue lock dirty'.
^ nil
].
System addToCommitOrAbortReleaseLocksSet: ObjectLogEntry objectQueue].
^ObjectLogEntry objectLog


Maybe we could add this directly to class side of ObjectLogEntry so that others can benefit from it?
 

 
As Mariano and James point out, there are other possible sources of extent growth that are related to a commit record backlog because you have a GemTools/tODE/topaz session open (and idle) on a production system that is "busy committing" ... commit record backlog data is transient data that is stored in the extent and will cause the extent to grow, but once the session or sessions causing the commit record backlog log out commit or abort, the transient data is no longer needed by the system and will "magically turn into free space" at checkpoint boundaries ....

The key point here is that object log data is persistent "user data" and will not turn into free space until 1) you break the link to the persistent root (object log clear) and 2) you run an MFC. Commit record backlog data "system data" and will turn into free space as soon as the sessions abort/commit/logout and a checkpoint is hit, i.e., no MFC is needed ... The default checkpoint interval is 5 minutes I think ...


Dale, it is not clear to me what the checkpoint interval is. I understood it was at abort/commit/logout..so how is this internal related? Is there a way I can check the stone configuration parameter of this (the 5 minutes)?

So for the "system data" to turn into free space, the other gems need to abort/commit/logout AND only after 5 minutes that turning into free space will happen?   I ask because I am scheduling some batch jobs running at night, and as soon as they all finish, I run GC...and sometimes it seems I do not really GC what I should have...

Thanks!



--
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: ObjectLog cleanup

GLASS mailing list
Good comments and questions (with further inline responses)…

On Aug 6, 2015, at 7:41 AM, Mariano Martinez Peck <[hidden email]> wrote:


On Wed, Aug 5, 2015 at 6:48 PM, James Foster <[hidden email]> wrote:
Here is my script...


Thanks for sharing your script James. I answer inline below some questions. 
 

cleanupObjectLog

  | log date1 date2 sortedCopy count |
  log := ObjectLogEntry objectLog.

“keep only one per day of various maintenance tasks (useful to go back years on size!)"
  #('MTCE: Repository Size' 'MTCE: MFC' 'MTCE: expired sessions') do: [:eachLabel | 
  log copy do: [:each | 
  each label = eachLabel ifTrue: [
  each stamp date = date1 ifTrue: [
  log remove: each.
  ] ifFalse: [
  date1 := each stamp date.
  ].
  ].
  ].
  ].


Good!

 

“Keep only one per week of anything more than a month old"
  date1 := Date today subtractDays: 30.
  log copy do: [:each | 
  (each stamp date < date1 and: [each stamp date day \\ 7 ~= 0]) ifTrue: [
  log remove: each.
  ].
  ].



This is the part I understand the less. Why would make sense to keep one random entry once per week of things older than a month? 
I mean...a random entry will probably tell me anything. In which case do you think this could be useful?

The comment should say “Keep only one DAY per week of anything more than month old”.

This is an attempt to balance keeping everything and keeping nothing (and I don’t claim to have the perfect balance!). Beyond 30 days, for things like MFC reports, four per month seems quite adequate to give an idea of the trend. For things like errors, if you haven’t looked at it in 30 days then some pruning seems appropriate. I figured that picking one random day per week gives an idea if an error is common or rare. 

“keep only last three days of session expiration"
  date1 := Date today subtractDays: 3.
  log copy do: [:each | 
  (each stamp date < date1 and: [each label = 'MTCE: expired sessions']) ifTrue: [
  log remove: each.
  ].
  ].



Good!

 
“keep only five per day of lock failures"
date1 := nil.
log copy do: [:each | 
each stamp date = date1 ifTrue: [
each label = 'Lock not acquired - retrying' ifTrue: [
count < 5 ifTrue: [
count := count + 1.
] ifFalse: [
log remove: each.
].
].
] ifFalse: [
date1 := each stamp date.
count := 0.
].
].

Good!

 

“beyond ten days keep only twenty errors per day"
date1 := nil.
  date2 := Date today subtractDays: 10.
log copy do: [:each | 
each stamp date = date1 ifTrue: [
each priority == 2 ifTrue: [
count < 20 ifTrue: [
count := count + 1.
] ifFalse: [
date1 < date2 ifTrue: [
log remove: each.
].
].
].
] ifFalse: [
date1 := each stamp date.
count := 0.
].
].


Good.

 
  sortedCopy := log asSortedCollection: [:a :b | 
  a priority > b priority or: [
  a priority = b priority and: [a stamp < b stamp].
  ].
  ].
  log 
  size: 0;
  addAll: sortedCopy asOrderedCollection;
yourself.

A couple of questions:

1) Don't you need to get the lock (as I did in my script) before trying to write the object log?

Good catch. In the few applications where I’ve used this script the users are active during the day and the maintenance (including this script) run during the night. Thus, I haven’t had a locking problem (that I know of!). But, yes, I should follow your example of getting the lock.

2) I also have some Transcript show (priority 7), some inspect/explore (priority 8) and some trace:  (priority 6).  I guess I should add a similar part for this...not sure how many days though… 

I think that the above will trim your other things to one day per week. From there you could reduce the count as I’ve done with errors.


Thanks in advance,

I appreciate Dale’s suggestion of combining the best of the scripts and adding it to the framework.

James


 
%

On Aug 5, 2015, at 2:33 PM, Mariano Martinez Peck via Glass <[hidden email]> wrote:



On Wed, Aug 5, 2015 at 5:41 PM, Dale Henrichs via Glass <[hidden email]> wrote:


On 07/31/2015 08:58 AM, Trussardi Dario Romano via Glass wrote:

James,


On Jul 31, 2015, at 3:37 AM, Trussardi Dario Romano via Glass <[hidden email]> wrote:

Ciao,

i have a deployment system based on GemStone version '3.1.0.6'


Now i use Gemtools and todeClient to do some works on the repository:  update code,  save repository .....


When i login with the tools  i note the repository grows significantly,  and also, the relative  full backups grows significantly.

To reset the system i need to clear the Object Log with the relative clear command  ( ol clear in tode ) 

Do you think that the Object Log grows significantly during your time logged in with the tools? What is its size at the beginning and end of your session?

I don't have real data about the extent0.dbf change size from beginning and end of a gemtools session.

But the full backup size  before Object Log  clear is :  4 258 529280

after Object Log clear is: 1 376 124 928

The SystemRepository freeSpace size before Object Log clear is :  1 092 419 584

after Object Log clear ( and one hour  of system background works )  is:  5 267 701 760


Okay as James has mentioned, it definitely looks like the Object Log is the source of the "excess data" ... it would be interesting to understand what is in the object log ... My guess would be that you are having recurring errors and the continuations created to record those errors can easily cause a bunch of data to be stored in your extent ... if the errors are providing useful data, than this can be viewed as a "cost of doing business" and you will just need to have a regularly scheduled task for clearing the object log ... you could arrange to regularly clear continuation entries from the object log that are more than a day or week or ? old then at least you would expect to reach a steady state for extent size ... then you would only need to consider shrinking the size of the extent when you had an anomaly where a series of unexpected errors cropped up ....


I do exactly that as part of my daily cleaning:


cleanObjectLogEntriesDaysAgo: aNumberOfDays
| log |
log := self objectLogEntries: true.
(log select: [:ea | (Date today - ea stamp asDate) asDays >= aNumberOfDays ]) do: [:ea | log remove: ea ifAbsent: []].
System commitTransaction.


objectLogEntries: shouldLock

shouldLock 
ifTrue: [
System writeLock: ObjectLogEntry objectQueue
ifDenied: [ 
Transcript show: 'ObjectLogEntry objectQueue lock denied'.
^ nil
]
ifChanged: [ 
System addToCommitOrAbortReleaseLocksSet: ObjectLogEntry objectQueue.
Transcript show: 'ObjectLogEntry objectQueue lock dirty'.
^ nil
].
System addToCommitOrAbortReleaseLocksSet: ObjectLogEntry objectQueue].
^ObjectLogEntry objectLog


Maybe we could add this directly to class side of ObjectLogEntry so that others can benefit from it?
 

 
As Mariano and James point out, there are other possible sources of extent growth that are related to a commit record backlog because you have a GemTools/tODE/topaz session open (and idle) on a production system that is "busy committing" ... commit record backlog data is transient data that is stored in the extent and will cause the extent to grow, but once the session or sessions causing the commit record backlog log out commit or abort, the transient data is no longer needed by the system and will "magically turn into free space" at checkpoint boundaries ....

The key point here is that object log data is persistent "user data" and will not turn into free space until 1) you break the link to the persistent root (object log clear) and 2) you run an MFC. Commit record backlog data "system data" and will turn into free space as soon as the sessions abort/commit/logout and a checkpoint is hit, i.e., no MFC is needed ... The default checkpoint interval is 5 minutes I think ...


Dale, it is not clear to me what the checkpoint interval is. I understood it was at abort/commit/logout..so how is this internal related? Is there a way I can check the stone configuration parameter of this (the 5 minutes)?

So for the "system data" to turn into free space, the other gems need to abort/commit/logout AND only after 5 minutes that turning into free space will happen?   I ask because I am scheduling some batch jobs running at night, and as soon as they all finish, I run GC...and sometimes it seems I do not really GC what I should have...

Thanks!



--
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: ObjectLog cleanup

GLASS mailing list


“Keep only one per week of anything more than a month old"
  date1 := Date today subtractDays: 30.
  log copy do: [:each | 
  (each stamp date < date1 and: [each stamp date day \\ 7 ~= 0]) ifTrue: [
  log remove: each.
  ].
  ].



This is the part I understand the less. Why would make sense to keep one random entry once per week of things older than a month? 
I mean...a random entry will probably tell me anything. In which case do you think this could be useful?

The comment should say “Keep only one DAY per week of anything more than month old”.

This is an attempt to balance keeping everything and keeping nothing (and I don’t claim to have the perfect balance!). Beyond 30 days, for things like MFC reports, four per month seems quite adequate to give an idea of the trend. For things like errors, if you haven’t looked at it in 30 days then some pruning seems appropriate. I figured that picking one random day per week gives an idea if an error is common or rare. 


Ufff now it totally makes sense :)  I also misread the code hahahahhaa. 
 

  sortedCopy := log asSortedCollection: [:a :b | 
  a priority > b priority or: [
  a priority = b priority and: [a stamp < b stamp].
  ].
  ].
  log 
  size: 0;
  addAll: sortedCopy asOrderedCollection;
yourself.

A couple of questions:

1) Don't you need to get the lock (as I did in my script) before trying to write the object log?

Good catch. In the few applications where I’ve used this script the users are active during the day and the maintenance (including this script) run during the night. Thus, I haven’t had a locking problem (that I know of!). But, yes, I should follow your example of getting the lock.


Great. I also run it at night...but I also may have some background processes running which do Transcript show: and hence end up writing the object log. So...just to minimize chances of a commit conflict that would prevent the cleaning. 

 

2) I also have some Transcript show (priority 7), some inspect/explore (priority 8) and some trace:  (priority 6).  I guess I should add a similar part for this...not sure how many days though… 

I think that the above will trim your other things to one day per week. From there you could reduce the count as I’ve done with errors.


Indeed. I would let that for priority 6 and 7. But...for inspect/explore as this is mostly a developer-oriented thing, I would expect they do not live long as the developer should have probably finished working with that just a couple of hours later. And the inspected object may hold quite a lot of stuff (it's not a string as the case of transcript and trace). So... I would keep these guys only for....say... 2 days :)

Thoughts?
 

Thanks in advance,

I appreciate Dale’s suggestion of combining the best of the scripts and adding it to the framework.


Yes, I would do that. However...I do not expect this code to be THE used one for everybody. But if at least this method is stored in class side of ObjectLogEntry with a selector like #objectLogCleanupExampleScript or something, that would be nice. Some may use it directly, and others would write their own script probably based on the idea of this one.

What do you think?

 
James


 
%

On Aug 5, 2015, at 2:33 PM, Mariano Martinez Peck via Glass <[hidden email]> wrote:



On Wed, Aug 5, 2015 at 5:41 PM, Dale Henrichs via Glass <[hidden email]> wrote:


On 07/31/2015 08:58 AM, Trussardi Dario Romano via Glass wrote:

James,


On Jul 31, 2015, at 3:37 AM, Trussardi Dario Romano via Glass <[hidden email]> wrote:

Ciao,

i have a deployment system based on GemStone version '3.1.0.6'


Now i use Gemtools and todeClient to do some works on the repository:  update code,  save repository .....


When i login with the tools  i note the repository grows significantly,  and also, the relative  full backups grows significantly.

To reset the system i need to clear the Object Log with the relative clear command  ( ol clear in tode ) 

Do you think that the Object Log grows significantly during your time logged in with the tools? What is its size at the beginning and end of your session?

I don't have real data about the extent0.dbf change size from beginning and end of a gemtools session.

But the full backup size  before Object Log  clear is :  4 258 529280

after Object Log clear is: 1 376 124 928

The SystemRepository freeSpace size before Object Log clear is :  1 092 419 584

after Object Log clear ( and one hour  of system background works )  is:  5 267 701 760


Okay as James has mentioned, it definitely looks like the Object Log is the source of the "excess data" ... it would be interesting to understand what is in the object log ... My guess would be that you are having recurring errors and the continuations created to record those errors can easily cause a bunch of data to be stored in your extent ... if the errors are providing useful data, than this can be viewed as a "cost of doing business" and you will just need to have a regularly scheduled task for clearing the object log ... you could arrange to regularly clear continuation entries from the object log that are more than a day or week or ? old then at least you would expect to reach a steady state for extent size ... then you would only need to consider shrinking the size of the extent when you had an anomaly where a series of unexpected errors cropped up ....


I do exactly that as part of my daily cleaning:


cleanObjectLogEntriesDaysAgo: aNumberOfDays
| log |
log := self objectLogEntries: true.
(log select: [:ea | (Date today - ea stamp asDate) asDays >= aNumberOfDays ]) do: [:ea | log remove: ea ifAbsent: []].
System commitTransaction.


objectLogEntries: shouldLock

shouldLock 
ifTrue: [
System writeLock: ObjectLogEntry objectQueue
ifDenied: [ 
Transcript show: 'ObjectLogEntry objectQueue lock denied'.
^ nil
]
ifChanged: [ 
System addToCommitOrAbortReleaseLocksSet: ObjectLogEntry objectQueue.
Transcript show: 'ObjectLogEntry objectQueue lock dirty'.
^ nil
].
System addToCommitOrAbortReleaseLocksSet: ObjectLogEntry objectQueue].
^ObjectLogEntry objectLog


Maybe we could add this directly to class side of ObjectLogEntry so that others can benefit from it?
 

 
As Mariano and James point out, there are other possible sources of extent growth that are related to a commit record backlog because you have a GemTools/tODE/topaz session open (and idle) on a production system that is "busy committing" ... commit record backlog data is transient data that is stored in the extent and will cause the extent to grow, but once the session or sessions causing the commit record backlog log out commit or abort, the transient data is no longer needed by the system and will "magically turn into free space" at checkpoint boundaries ....

The key point here is that object log data is persistent "user data" and will not turn into free space until 1) you break the link to the persistent root (object log clear) and 2) you run an MFC. Commit record backlog data "system data" and will turn into free space as soon as the sessions abort/commit/logout and a checkpoint is hit, i.e., no MFC is needed ... The default checkpoint interval is 5 minutes I think ...


Dale, it is not clear to me what the checkpoint interval is. I understood it was at abort/commit/logout..so how is this internal related? Is there a way I can check the stone configuration parameter of this (the 5 minutes)?

So for the "system data" to turn into free space, the other gems need to abort/commit/logout AND only after 5 minutes that turning into free space will happen?   I ask because I am scheduling some batch jobs running at night, and as soon as they all finish, I run GC...and sometimes it seems I do not really GC what I should have...

Thanks!



--
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass




--




--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: ObjectLog cleanup

GLASS mailing list

I appreciate Dale’s suggestion of combining the best of the scripts and adding it to the framework.

Yes, I would do that. However...I do not expect this code to be THE used one for everybody. But if at least this method is stored in class side of ObjectLogEntry with a selector like #objectLogCleanupExampleScript or something, that would be nice. Some may use it directly, and others would write their own script probably based on the idea of this one.

What do you think?

Excellent. Rather than trying to make it perfect we just make it available for review, comment, and use. You quickly caught a problem with my script and others might improve it as well.

James


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: ObjectLog cleanup

GLASS mailing list
OK, I will try to make yours, add my lock stuff, and probably add the "keep all inspect/explore only for 2 days". And then do a push request for review.  

On Thu, Aug 6, 2015 at 1:18 PM, James Foster <[hidden email]> wrote:

I appreciate Dale’s suggestion of combining the best of the scripts and adding it to the framework.

Yes, I would do that. However...I do not expect this code to be THE used one for everybody. But if at least this method is stored in class side of ObjectLogEntry with a selector like #objectLogCleanupExampleScript or something, that would be nice. Some may use it directly, and others would write their own script probably based on the idea of this one.

What do you think?

Excellent. Rather than trying to make it perfect we just make it available for review, comment, and use. You quickly caught a problem with my script and others might improve it as well.

James




--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: ObjectLog cleanup

Richard Sargent
Administrator
In reply to this post by GLASS mailing list
GLASS mailing list wrote
> I appreciate Dale’s suggestion of combining the best of the scripts and adding it to the framework.
>
> Yes, I would do that. However...I do not expect this code to be THE used one for everybody. But if at least this method is stored in class side of ObjectLogEntry with a selector like #objectLogCleanupExampleScript or something, that would be nice. Some may use it directly, and others would write their own script probably based on the idea of this one.
>
> What do you think?

Excellent. Rather than trying to make it perfect we just make it available for review, comment, and use. You quickly caught a problem with my script and others might improve it as well.
>> I do not expect this code to be THE used one for everybody.
That is correct. The problem suggests that you solve it by storing an instance of a new class that provides these various behaviours and that is configurable (e.g. the various numbers in James' script).

People can then easily implement a custom subclass which picks the subset of behaviours or even adds their own custom enhancements.


James


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: extent0.dbf grows

GLASS mailing list
In reply to this post by GLASS mailing list


On 08/05/2015 02:33 PM, Mariano Martinez Peck wrote:
>
>
> Dale, it is not clear to me what the checkpoint interval is. I
> understood it was at abort/commit/logout..so how is this internal
> related? Is there a way I can check the stone configuration parameter
> of this (the 5 minutes)?
A checkpoint is a gemstone system operation where all data pages in the
SPC that were written before a given commit are flushed to disk. After a
checkpoint, gemstone guarantees that all data for a particular commit
has been written to the extents ... Until a commit is checkpointed, the
systems relies on the records in the tranlog for recovery ... the
checkpoint is not necessarily the primary point at which pages are freed
up in an extent but it does represent a book keeping boundary that
triggers other processing that does lead to freeing up extent pages ....

When you recover from a crash, the system looks at the commit that was
last checkpointed and then scans the tranlogs looking for that commit
and then reads the tranlogs from that point forwards to complete
recovery ....

STN_CHECKPOINT_INTERVAL in the system.conf file is used to customize the
checkpoint interval ... Given the above the checkpoint interval controls
how much data would have to be recovered from tranlogs in the event of a
system crash ... with the default checkpoint interval of 5 minutes, that
means that 5 minutes worth of tranlog data will have to be recovered on
the other end of the spectrum, with a checkpoint interval of 5 minutes,
that means that every 5 minutes the SPC will be scanned for pages that
have not been written to disk ... tuning the checkpoint interval
involves finding a balance between scan cpu consumption, disk i/o, and
recovery time, SPC size and commit rates.

If the checkpoint interval is too short you may consume a lot of cpu
time doing checkpoints without actually writing any dirty pages. If the
checkpoint interval is too long, it may take a long time to replay
tranlogs during crash recovery ... There's a third inflection point
where the checkpoint interval is shorter than the time it takes to write
all the dirty pages accumulated and you end up in perpetual checkpoint
mode - in this case you just have to live with the exposure to longer
recovery times (or take steps to improve disk i/o or ....)

At the end of the day, tuning the checkpoint interval only comes into
play at higher commit rates ...
>
> So for the "system data" to turn into free space, the other gems need
> to abort/commit/logout AND only after 5 minutes that turning into free
> space will happen?   I ask because I am scheduling some batch jobs
> running at night, and as soon as they all finish, I run GC...and
> sometimes it seems I do not really GC what I should have...
>
The actual process for freeing up a page is a pretty complicated
process. Dirty pages cannot be reclaimed, so I mentioned the checkpoint
interval in relation to free pages because the checkpoint kicks off
processing (in a manner of speaking) that leads to the possible creation
of free pages ... different types of data are stoned on pages and the
rules for reclaiming a page depends upon what type of data is on the
page ...

Data pages cannot be reclaimed until there are no active views that
could possible reference an object on that page (the object table maps
oops to pages) so a single live object on a page can keep an entire data
page from being reclaimed ... So in your case when you run the gc, you
are not guaranteed that all of the pages housing the objects will be
reclaimed. In the worse case, each dead object may be on a separate  
page and you end up with no additional free pages ... the reclaim gems
do look around for "scavengable pages" and will do a certain amount of
automatic data consolidation and you can get information about "data
fragmentation" by using Repository>>pagesWithPercentFree: or
Repository>>fastPagesWithPercentFree:, but as I think I've mentioned
before the system is very dynamic and over time a system that is running
at constant rates will achieve an equilibrium in terms of free pages but
the actual number of free pages will fluctuate within a  range that is
dictated by quite a few different factors.

It's good to keep an eye on things to recognize when unreasonable growth
is occurring, but I don't think that it is reasonable to expect that the
system always stay within some strict size limits ...

Of course the challenge is to differentiate between unreasonable growth
and growth due to real data accumulation, so it's worth diving deep on
these different subjects so that you can learn about the normal rhythms
of your own system ...

Dale


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: extent0.dbf grows

GLASS mailing list

On Thu, Aug 6, 2015 at 8:29 PM, Dale Henrichs <[hidden email]> wrote:


On 08/05/2015 02:33 PM, Mariano Martinez Peck wrote:


Dale, it is not clear to me what the checkpoint interval is. I understood it was at abort/commit/logout..so how is this internal related? Is there a way I can check the stone configuration parameter of this (the 5 minutes)?
A checkpoint is a gemstone system operation where all data pages in the SPC that were written before a given commit are flushed to disk. After a checkpoint, gemstone guarantees that all data for a particular commit has been written to the extents ... Until a commit is checkpointed, the systems relies on the records in the tranlog for recovery ... the checkpoint is not necessarily the primary point at which pages are freed up in an extent but it does represent a book keeping boundary that triggers other processing that does lead to freeing up extent pages ....

When you recover from a crash, the system looks at the commit that was last checkpointed and then scans the tranlogs looking for that commit and then reads the tranlogs from that point forwards to complete recovery ....

Got it! Now I see why once I restarted from a crash it took 5 minutes to start :)
 

STN_CHECKPOINT_INTERVAL in the system.conf file is used to customize the checkpoint interval ... Given the above the checkpoint interval controls how much data would have to be recovered from tranlogs in the event of a system crash ... with the default checkpoint interval of 5 minutes, that means that 5 minutes worth of tranlog data will have to be recovered on the other end of the spectrum, with a checkpoint interval of 5 minutes, that means that every 5 minutes the SPC will be scanned for pages that have not been written to disk ... tuning the checkpoint interval involves finding a balance between scan cpu consumption, disk i/o, and recovery time, SPC size and commit rates.

If the checkpoint interval is too short you may consume a lot of cpu time doing checkpoints without actually writing any dirty pages. If the checkpoint interval is too long, it may take a long time to replay tranlogs during crash recovery ... There's a third inflection point where the checkpoint interval is shorter than the time it takes to write all the dirty pages accumulated and you end up in perpetual checkpoint mode - in this case you just have to live with the exposure to longer recovery times (or take steps to improve disk i/o or ....)

At the end of the day, tuning the checkpoint interval only comes into play at higher commit rates ...

Great. Thanks for the explanation. The more I read and understand GemStone, the more I am impressed by such a complex yet reliable software!
                   


So for the "system data" to turn into free space, the other gems need to abort/commit/logout AND only after 5 minutes that turning into free space will happen?   I ask because I am scheduling some batch jobs running at night, and as soon as they all finish, I run GC...and sometimes it seems I do not really GC what I should have...

The actual process for freeing up a page is a pretty complicated process. Dirty pages cannot be reclaimed, so I mentioned the checkpoint interval in relation to free pages because the checkpoint kicks off processing (in a manner of speaking) that leads to the possible creation of free pages ... different types of data are stoned on pages and the rules for reclaiming a page depends upon what type of data is on the page ...

Data pages cannot be reclaimed until there are no active views that could possible reference an object on that page (the object table maps oops to pages) so a single live object on a page can keep an entire data page from being reclaimed ... So in your case when you run the gc, you are not guaranteed that all of the pages housing the objects will be reclaimed. In the worse case, each dead object may be on a separate  page and you end up with no additional free pages ... the reclaim gems do look around for "scavengable pages" and will do a certain amount of automatic data consolidation and you can get information about "data fragmentation" by using Repository>>pagesWithPercentFree: or Repository>>fastPagesWithPercentFree:, but as I think I've mentioned before the system is very dynamic and over time a system that is running at constant rates will achieve an equilibrium in terms of free pages but the actual number of free pages will fluctuate within a  range that is dictated by quite a few different factors.


Thanks for the explanation Dale. 

 
It's good to keep an eye on things to recognize when unreasonable growth is occurring, but I don't think that it is reasonable to expect that the system always stay within some strict size limits ...

Of course the challenge is to differentiate between unreasonable growth and growth due to real data accumulation, so it's worth diving deep on these different subjects so that you can learn about the normal rhythms of your own system ...


Indeed.
 
Dale





--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: ObjectLog cleanup

GLASS mailing list
In reply to this post by Richard Sargent
OK, I opened: https://github.com/GsDevKit/GsDevKit/issues/71
The code is not the ideal, it's just what I can do with the time I have available for it. Feel free to improve it.

Cheers,


On Thu, Aug 6, 2015 at 1:29 PM, Richard Sargent via Glass <[hidden email]> wrote:
GLASS mailing list wrote
>> I appreciate Dale’s suggestion of combining the best of the scripts and
>> adding it to the framework.
>>
>> Yes, I would do that. However...I do not expect this code to be THE used
>> one for everybody. But if at least this method is stored in class side of
>> ObjectLogEntry with a selector like #objectLogCleanupExampleScript or
>> something, that would be nice. Some may use it directly, and others would
>> write their own script probably based on the idea of this one.
>>
>> What do you think?
>
> Excellent. Rather than trying to make it perfect we just make it available
> for review, comment, and use. You quickly caught a problem with my script
> and others might improve it as well.

>> I do not expect this code to be THE used one for everybody.
That is correct. The problem suggests that you solve it by storing an
instance of a new class that provides these various behaviours and that is
configurable (e.g. the various numbers in James' script).

People can then easily implement a custom subclass which picks the subset of
behaviours or even adds their own custom enhancements.



> James
>
>
> _______________________________________________
> Glass mailing list

> Glass@.gemtalksystems

> http://lists.gemtalksystems.com/mailman/listinfo/glass





--
View this message in context: http://forum.world.st/extent0-dbf-grows-tp4840377p4841297.html
Sent from the GLASS mailing list archive at Nabble.com.
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass



--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: ObjectLog cleanup

GLASS mailing list
Looks good ... when I get around to integrating it (unless someone beats me to it with a pull request) I'll take a closer look ...

Thanks!

Dale

On 08/11/2015 06:43 AM, Mariano Martinez Peck via Glass wrote:
OK, I opened: https://github.com/GsDevKit/GsDevKit/issues/71
The code is not the ideal, it's just what I can do with the time I have available for it. Feel free to improve it.

Cheers,


On Thu, Aug 6, 2015 at 1:29 PM, Richard Sargent via Glass <[hidden email]> wrote:
GLASS mailing list wrote
>> I appreciate Dale’s suggestion of combining the best of the scripts and
>> adding it to the framework.
>>
>> Yes, I would do that. However...I do not expect this code to be THE used
>> one for everybody. But if at least this method is stored in class side of
>> ObjectLogEntry with a selector like #objectLogCleanupExampleScript or
>> something, that would be nice. Some may use it directly, and others would
>> write their own script probably based on the idea of this one.
>>
>> What do you think?
>
> Excellent. Rather than trying to make it perfect we just make it available
> for review, comment, and use. You quickly caught a problem with my script
> and others might improve it as well.

>> I do not expect this code to be THE used one for everybody.
That is correct. The problem suggests that you solve it by storing an
instance of a new class that provides these various behaviours and that is
configurable (e.g. the various numbers in James' script).

People can then easily implement a custom subclass which picks the subset of
behaviours or even adds their own custom enhancements.



> James
>
>
> _______________________________________________
> Glass mailing list

> [hidden email]

> http://lists.gemtalksystems.com/mailman/listinfo/glass





--
View this message in context: http://forum.world.st/extent0-dbf-grows-tp4840377p4841297.html
Sent from the GLASS mailing list archive at Nabble.com.
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass



--


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: extent0.dbf grows

GLASS mailing list
In reply to this post by GLASS mailing list
How does the Zinc server behaves here ?


Assuming, that one has lots of GEMS running - some are Zinc HTTP
servers, others are simple topaz based servers.

And the topaz servers are running always and doing requests against the
stone (time scheduled in seconds intervals).

But consider a situation, where the Zinc servers do not get any external
requests for a long period of time (hours) ...

If the Zinc server is not written correctly, then this system may get
into trouble ... right ?

Have to look into the sources ...

Marten


Am 31.07.2015 um 16:33 schrieb James Foster via Glass:

>
>> On Jul 31, 2015, at 3:37 AM, Trussardi Dario Romano via Glass
>> <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> Ciao,
>>
>> i have a deployment system based on GemStone version '3.1.0.6'
>>
>>
>> Now i use Gemtools and todeClient to do some works on the repository:
>>  update code,  save repository .....
>>
>>
>> When i login with the tools  i note the repository
>> grows significantly, and also,the relative  full backups
>> grows significantly.
>>
>> To reset the system i need to clear the Object Log with the relative
>> clear command  ( ol clearin tode )
>
> Do you think that the Object Log grows significantly during your time
> logged in with the tools? What is its size at the beginning and end of
> your session?
>
>> After 1 hour ,  because i have active the #WAGemStoneMaintenanceTask
>>
>> A) the system recovers the free space
>>
>> B) the relative full backups become small
>>
>> But now i have an extent0.dbf   of   5 991 563 264  with a freeSpace
>> of 5 267 701 760.
>>
>> It is not a very good situation.
>
> Why? Having empty space in the repository (extents) isn’t really much
> worse than having empty (unused) space in the file system.
>
>> Questions:
>>
>> 1) what should I do with the tools to not increase the size of the
>> relative extent ?
>>
>> I need to operate with the tools  when the seasideGems30 are down ?
>
> The most common cause of unexpected repository growth is a commit record
> (CR) backlog. If you log in a session and do not commit while other
> sessions do commits, then you get a CR backlog. You should ensure that
> each login, including tools, does a regular commit.
>
>> 2) to resize the extent i need to do a full backup and restoring into
>> a virgin extent?
>
> Yes.
> See https://downloads.gemtalksystems.com/docs/GemStone64/3.2.x/GS64-SysAdmin-3.2/GS64-SysAdmin-3.2.htm?https://downloads.gemtalksystems.com/docs/GemStone64/3.2.x/GS64-SysAdmin-3.2/7-RepositorySpace.htm#pgfId-82473.
>
>> 3) there is possibility of directly reducing the extent file ?
>
> Repository>>#’shrinkExtents’ might be worth a try, but it is so rarely
> useful that it has been deprecated.
>
>> Thanks for any considerations,
>>
>>
>> Dario
>
> James
>
>
>
> _______________________________________________
> Glass mailing list
> [hidden email]
> http://lists.gemtalksystems.com/mailman/listinfo/glass
>


--
Marten Feldtmann
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass