Re: FYI: how to prevent mysql from oom-killer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

On 04/13/2012 02:47 PM, Mihamina Rakotomandimby wrote:
> On 04/13/2012 03:17 PM, Reindl Harald wrote:
>> with one single command you can protect processes from get
>> killed i started to run this every 15 minutes to make sure it is
>> also active after restarts
> 
> I understand your issue, but isn'there a configuration way to just
> limit the memory usage of MySQL?
> 

That won't affect the OOM killer's decision that mysqld is
"unimportant". Influencing that using the oom_score_adj tunable is
exactly the right way to do this as Harald said, from
filesystems/proc.txt:

"The value of /proc/<pid>/oom_score_adj is added to the badness score
before it is used to determine which task to kill. Acceptable values
range from -1000 (OOM_SCORE_ADJ_MIN) to +1000 (OOM_SCORE_ADJ_MAX).
This allows userspace to polarize the preference for oom killing
either by  always preferring a certain task or completely disabling
it. The lowest  possible value, -1000, is equivalent to disabling oom
killing entirely for that task since it will always report a badness
score of 0."

There are other tunables there (see proc.txt and the man page) but
this one gets the job done.

Regards,
Bryn.

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

iEYEARECAAYFAk+IMB8ACgkQ6YSQoMYUY94n4ACfe5hN6R5uKvZgpeDIDLk8arwj
p94AnjBEaSd4QdthfAlDMscSvoctl+/v
=8ocJ
-----END PGP SIGNATURE-----
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux