How to increase the swap memory for mysql in centos 6.2
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to increase the swap memory for mysql in centos 6.2
Hi all,
One of my centos machine i want to increase of swap memory for mysql .
Quote:
[root@example ~]# vmstat
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
1 0 537016 77028 14096 188032 38 43 102 61 108 316 1 1 97 2 0
512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 2.78301 s, 193 MB/s
Quote:
[root@example ~]# mkswap /mnt/file.swap
mkswap: /mnt/file.swap: warning: don't erase bootbits sectors
on whole disk. Use -f to force.
Setting up swapspace version 1, size = 524284 KiB
no label, UUID=f2612905-e880-48b1-ae65-13dc93f101ce
Quote:
[root@example ~]# sudo swapon /mnt/file.swap
[root@example ~]# vi /etc/fstab
Device Boot Start End Blocks Id System
/dev/sda1 * 1 39 307200 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 39 6271 50056192 83 Linux
/dev/sda3 6271 6528 2064384 82 Linux swap / Solaris
[root@example ~]# vmstat
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 535968 68376 2928 202980 38 43 102 68 108 317 1 1 97 2 0
[root@example ~]#
Im trying to increase the swap memory for my mysql alone.whether its possible to allocate large amount of virtual memory to my mysql application . Tomcat i had increase the virtual memory by using following command in service export JAVA_OPTS="-Xms128m -Xmx512m" .In same way whether i can determine my mysql application to utilise lareger virtual memory at startup of mysql
Last edited by jsaravana87; 06-14-2012 at 05:43 AM.
Not directly - the system handles that automatically. Large memory users will (typically) use the swap most - if they actually use ("dirty") the memory.
In general, everything is done not to use swap - it's too slow compared to RAM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.