Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mon$memory_usage: Incorrect database memory reported on CS and SC [CORE2478] #2891

Closed
firebird-automations opened this issue May 27, 2009 · 10 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Douglas Tosi (douglasht)

When using Classic or SuperClassic:
- The reported attachment memory does not include the attachment cache. Because the cache was allocated specifically for that attachment, it should be reported as owned by the attachment.
- The database memory (stat_group=0) starts at 35MB and stays like that for the entire load-test. Which seems incorrect given that task manager shows peak of 200MB. (I'm not trying to directly compare mon$memory and task manager. It's just to show that memory usage *has* changed during the load-test.)

Commits: bcebd6f

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

The only way to report the more or less correct memory counters would be the following:

1) The record linked to MON$DATABASE always reports zeroes (it means that Classic has no shared cache)
2) The record linked to MON$ATTACHMENTS reports a total of both attachment and database specific memory pools

It somewhat breaks the idea behind aggregated counters (one might expect that a database pool counter would contain a sum of all its child pools), but this idea doesn't work in Classic anyway.

Another alternative would be to report proper memory statistics for attachments but random statistics for a database (instead of zeroes).

This is what can be done in v2.5. If you are not happy with that, a better solution will be deferred till v3.0.

@firebird-automations
Copy link
Collaborator Author

Commented by: Douglas Tosi (douglasht)

I believe zeroed stats is less confusing than random.
Would superclassic behave this way too?
Would total memory used by the server be the sum of the memory used by all attachments?

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Would superclassic behave this way too?
-- yes, as it doesn't have the shared cache either

Would total memory used by the server be the sum of the memory used by all attachments?
-- yes, approximately. There's a 64K memory pool (per process) not linked to any particular database, it won't be reported.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: In Progress [ 3 ] => In Progress [ 3 ]

Fix Version: 2.5 RC1 [ 10362 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: In Progress [ 3 ] => Open [ 1 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants