-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brian Aker wrote:
> Hi!
> 
> I want to come up with a standard behavior for failure to allocate
> memory. From this blog entry,
> http://ronaldbradford.com/blog/are-you-monitoring-rss-vsz-2009-03-08/,I quote
> 
> 
> "Monitoring MySQL Memory is a rather critical task because you can’t
> limit MySQL’s usage of physical memory resources. Improperly configured
> servers running MySQL can crash because you don’t understand memory usage."
> 
> Right now memory allocation in Drizzle is the same as MySQL, namely the
> behavior is mostly undefined (and allocation failures are not always
> caught). Up till a certain version MySQL did capture these errors in
> most cases, but in recent time these failures have just been ignored.
> 
> This is my proposal:
> 
> 1) Any memory failure on startup causes an immediate shutdown.

+1.  This can be entirely done in a single try/catch block in the
drizzled.cc:init_server_components() function.  Since it's not
time-critical or threaded code, using std::bad_alloc exception is
perfectly fine here and would clean up a crap-ton of checks for ENOMEM.

> 2) Memory failure within a session disconnects the session (and frees
> all memory that the session allocated).

+1. This can also be accomplished with localized exceptions, but more
planning is needed.

> 3) Failure of memory on connection from the user disallows the login.

- -1 Agree with Monty here...perhaps we should have some fallback routine
to free unneeded memory and attempt to proceed with the sessions' execution?

> 4) Memory failure in any system other then a session usage causes the
> server to shutdown (and attempts a graceful shutdown).

+1

> What am I missing? Is the above a good policy for design?
> 
> Cheers,
>     -Brian
> 
> -- 
> _______________________________________________________
> Brian "Krow" Aker, brian at tangent.org
> Seattle, Washington
> http://krow.net/                     <-- Me
> http://tangent.org/                <-- Software
> _______________________________________________________
> You can't grep a dead tree.
> 
> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~drizzle-discuss
> Post to     : [email protected]
> Unsubscribe : https://launchpad.net/~drizzle-discuss
> More help   : https://help.launchpad.net/ListHelp

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkm1RMwACgkQ2upbWsB4UtGmwgCgh4p2Q9YAlVEQk/nNYWIvOgQJ
3uYAmwXw6KfR6M5cMD0fMCLtFcPMzfwy
=k0Cp
-----END PGP SIGNATURE-----

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to