473,387 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Swap usage on RH 9

I am wondering if the "swap bug" is present on my kernel/version of
RedHat 9 as described at:
http://bugzilla.redhat.com/bugzilla/...g.cgi?id=89226

It looks like the OS prefers to fill the swap instead of releasing the
"unused" memory and use the available RAM. This problem is especially
present when starting the MySQL server and executing lots of big
queries... Swap file grows and grows and is never released even
though there is available memory.

When the MySQL server is not loaded, I still have 152Mb of swap used
and it goes up to 377Mb when using MySQL! Slowly but surely the swap
grows bigger and bigger... Am I having hallucinations or there's
something obvious I am mising here? Any hint/suggestion/explanation
on this problem?

Environment:

OS: Linux RedHat 9
Kernel: 2.4.25-040218
Intel Pentium 4 2.4 Ghz
512 Mb DDR RAM
40 Gb IDE disk

MySQL 3.32.58

Here's the output of command top:
======================
09:50:13 up 23 days, 20:42, 6 users, load average: 0.08, 0.03,
0.01
101 processes: 100 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: 3.8% user 1.0% system 0.0% nice 0.0% iowait 95.1%
idle
Mem: 507036k av, 501176k used, 5860k free, 0k shrd,
65568k buff
133504k active, 288820k inactive
Swap: 787176k av, 154268k used, 632908k free
322128k cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU
COMMAND
23227 root 19 0 1196 1196 876 S 1.9 0.2 0:03 0 top
23270 root 14 0 1160 1160 852 R 1.9 0.2 0:00 0 top
1 root 8 0 104 72 52 S 0.0 0.0 0:23 0 init
2 root 9 0 0 0 0 SW 0.0 0.0 0:00 0
keventd
3 root 19 19 0 0 0 SWN 0.0 0.0 0:00 0
ksoftirqd_CPU0
4 root 9 0 0 0 0 SW 0.0 0.0 13:32 0
kswapd
5 root 9 0 0 0 0 SW 0.0 0.0 0:04 0
bdflush
6 root 9 0 0 0 0 SW 0.0 0.0 0:09 0
kupdated
7 root 9 0 0 0 0 SW 0.0 0.0 0:04 0
pagebufd
8 root 9 0 0 0 0 SW 0.0 0.0 0:00 0
xfslogd/0
9 root 9 0 0 0 0 SW 0.0 0.0 0:00 0
xfsdatad/0
11 root 9 0 0 0 0 SW 0.0 0.0 7:51 0
kjournald
604 root 9 0 0 0 0 SW 0.0 0.0 0:00 0
kjournald
919 root 9 0 628 452 380 S 0.0 0.0 0:03 0
dhclient
959 root 9 0 252 208 192 S 0.0 0.0 0:04 0
syslogd
963 root 9 0 88 40 40 S 0.0 0.0 0:00 0
klogd
1042 named 9 0 1140 732 564 S 0.0 0.1 0:23 0
named
1060 root 8 0 352 216 172 S 0.0 0.0 0:01 0 sshd
1074 root 9 0 588 448 444 S 0.0 0.0 0:00 0
xinetd
1091 ntp 9 0 2404 2404 2172 S 0.0 0.4 0:54 0 ntpd
1201 root 9 0 17504 4 0 S 0.0 0.0 0:00 0
spamd
1219 root 9 0 256 4 0 S 0.0 0.0 0:00 0
stunnel
1277 root 9 0 1328 132 112 S 0.0 0.0 1:38 0
httpsd
1297 root 9 0 192 164 124 S 0.0 0.0 0:02 0
crond
1426 xfs 9 0 2240 92 68 S 0.0 0.0 0:00 0 xfs
1449 mailman 9 0 2864 188 184 S 0.0 0.0 0:00 0
python
1454 root 9 0 76 32 28 S 0.0 0.0 0:00 0
mingetty
1455 root 9 0 76 32 28 S 0.0 0.0 0:00 0
mingetty
1456 root 9 0 76 32 28 S 0.0 0.0 0:00 0
mingetty
1457 root 9 0 76 32 28 S 0.0 0.0 0:00 0
mingetty
1458 root 9 0 76 32 28 S 0.0 0.0 0:00 0
mingetty
1459 root 9 0 76 32 28 S 0.0 0.0 0:00 0
mingetty
1460 root 9 0 76 32 28 S 0.0 0.0 0:00 0
agetty
1461 mailman 9 0 3020 1120 312 S 0.0 0.2 3:20 0
python
1462 mailman 9 0 3028 1144 652 S 0.0 0.2 0:05 0
python
1463 mailman 9 0 3060 1104 348 S 0.0 0.2 3:15 0
python
1464 mailman 9 0 3060 1176 352 S 0.0 0.2 3:16 0
python
1465 mailman 9 0 3096 1152 348 S 0.0 0.2 3:18 0
python
1466 mailman 9 0 3140 1188 356 S 0.0 0.2 3:22 0
python
1467 mailman 9 0 3052 1052 352 S 0.0 0.2 3:20 0
python
4070 popuser 9 0 17148 8 4 S 0.0 0.0 0:00 0
spamd
4072 popuser 9 0 17148 8 4 S 0.0 0.0 0:00 0
spamd
16291 root 9 0 3036 652 624 S 0.0 0.1 0:56 0
httpd
18909 root 9 0 456 404 400 S 0.0 0.0 0:00 0
couriertcpd
18912 root 9 0 268 232 228 S 0.0 0.0 0:00 0
courierlogger
18920 root 8 0 456 404 400 S 0.0 0.0 0:00 0
couriertcpd
18922 root 9 0 268 232 228 S 0.0 0.0 0:00 0
courierlogger
18929 root 9 0 460 428 404 S 0.0 0.0 0:00 0
couriertcpd
18931 root 9 0 420 408 364 S 0.0 0.0 0:00 0
courierlogger
18939 root 9 0 444 392 388 S 0.0 0.0 0:00 0
couriertcpd
18943 root 9 0 264 228 224 S 0.0 0.0 0:00 0
courierlogger
19089 qmails 9 0 352 336 280 S 0.0 0.0 0:00 0
qmail-send
19091 qmaill 9 0 412 400 396 S 0.0 0.0 0:00 0
splogger
19092 root 9 0 332 304 292 S 0.0 0.0 0:00 0
qmail-lspawn
19093 qmailr 9 0 300 228 224 S 0.0 0.0 0:00 0
qmail-rspawn
19094 qmailq 9 0 300 272 268 S 0.0 0.0 0:00 0
qmail-clean
21849 root 9 0 1100 1100 944 S 0.0 0.2 0:00 0
safe_mysqld
21870 mysql 9 0 6240 6240 2384 S 0.0 1.2 0:01 0
mysqld
22955 root 9 0 1456 1456 1108 S 0.0 0.2 0:00 0 bash
23000 root 9 0 1456 1456 1108 S 0.0 0.2 0:00 0 bash
23045 root 9 0 1456 1456 1108 S 0.0 0.2 0:00 0 bash
23090 root 9 0 1452 1452 1104 S 0.0 0.2 0:00 0 bash
23135 root 9 0 1468 1468 1112 S 0.0 0.2 0:00 0 bash
23180 root 11 0 1464 1464 1108 S 0.0 0.2 0:00 0 bash
23229 root 9 0 732 732 600 S 0.0 0.1 0:00 0
mysqladmin
23234 root 9 0 2152 2152 1436 S 0.0 0.4 0:00 0
mysql
23236 root 9 0 1712 1712 1388 S 0.0 0.3 0:00 0
mysql
============================

Thank you
Jul 19 '05 #1
9 2191
Benoit St-Jean wrote:
I am wondering if the "swap bug" is present on my kernel/version of
RedHat 9 as described at:
http://bugzilla.redhat.com/bugzilla/...g.cgi?id=89226

It looks like the OS prefers to fill the swap instead of releasing the
"unused" memory ...


Ideally, you don't want the system to have to swap at all, and the
solution to that is add more RAM. Maybe you should increase your RAM up
to 1GB. If your system does not need to swap - then you will not to be
concerned about any "swap bug", as well as getting the better performance.

--
Regards,
Rodger
---
Fedora: Registered Linux User #285004.
---
"Do, or do not. There is no try." -- A Jedi Master.
---
Jul 20 '05 #2
Benoit St-Jean wrote:
I am wondering if the "swap bug" is present on my kernel/version of
RedHat 9 as described at:
http://bugzilla.redhat.com/bugzilla/...g.cgi?id=89226

It looks like the OS prefers to fill the swap instead of releasing the
"unused" memory ...


Ideally, you don't want the system to have to swap at all, and the
solution to that is add more RAM. Maybe you should increase your RAM up
to 1GB. If your system does not need to swap - then you will not to be
concerned about any "swap bug", as well as getting the better performance.

--
Regards,
Rodger
---
Fedora: Registered Linux User #285004.
---
"Do, or do not. There is no try." -- A Jedi Master.
---
Jul 20 '05 #3
Benoit St-Jean wrote:
I am wondering if the "swap bug" is present on my kernel/version of
RedHat 9 as described at:
http://bugzilla.redhat.com/bugzilla/...g.cgi?id=89226

It looks like the OS prefers to fill the swap instead of releasing the
"unused" memory ...


Ideally, you don't want the system to have to swap at all, and the
solution to that is add more RAM. Maybe you should increase your RAM up
to 1GB. If your system does not need to swap - then you will not to be
concerned about any "swap bug", as well as getting the better performance.

--
Regards,
Rodger
---
Fedora: Registered Linux User #285004.
---
"Do, or do not. There is no try." -- A Jedi Master.
---
Jul 20 '05 #4
RodgerH <ro*******@yahoo.com> wrote in message news:<AH********************@twister.southeast.rr. com>...
Benoit St-Jean wrote:
I am wondering if the "swap bug" is present on my kernel/version of
RedHat 9 as described at:
http://bugzilla.redhat.com/bugzilla/...g.cgi?id=89226

It looks like the OS prefers to fill the swap instead of releasing the
"unused" memory ...


Ideally, you don't want the system to have to swap at all, and the
solution to that is add more RAM. Maybe you should increase your RAM up
to 1GB. If your system does not need to swap - then you will not to be
concerned about any "swap bug", as well as getting the better performance.


Well, that's the problem. Even if you have 1Gb of RAM, it just
doesn't use it and prefers to fill the swap!
Jul 20 '05 #5
RodgerH <ro*******@yahoo.com> wrote in message news:<AH********************@twister.southeast.rr. com>...
Benoit St-Jean wrote:
I am wondering if the "swap bug" is present on my kernel/version of
RedHat 9 as described at:
http://bugzilla.redhat.com/bugzilla/...g.cgi?id=89226

It looks like the OS prefers to fill the swap instead of releasing the
"unused" memory ...


Ideally, you don't want the system to have to swap at all, and the
solution to that is add more RAM. Maybe you should increase your RAM up
to 1GB. If your system does not need to swap - then you will not to be
concerned about any "swap bug", as well as getting the better performance.


Well, that's the problem. Even if you have 1Gb of RAM, it just
doesn't use it and prefers to fill the swap!
Jul 20 '05 #6
RodgerH <ro*******@yahoo.com> wrote in message news:<AH********************@twister.southeast.rr. com>...
Benoit St-Jean wrote:
I am wondering if the "swap bug" is present on my kernel/version of
RedHat 9 as described at:
http://bugzilla.redhat.com/bugzilla/...g.cgi?id=89226

It looks like the OS prefers to fill the swap instead of releasing the
"unused" memory ...


Ideally, you don't want the system to have to swap at all, and the
solution to that is add more RAM. Maybe you should increase your RAM up
to 1GB. If your system does not need to swap - then you will not to be
concerned about any "swap bug", as well as getting the better performance.


Well, that's the problem. Even if you have 1Gb of RAM, it just
doesn't use it and prefers to fill the swap!
Jul 20 '05 #7
Jan
bs*****@yahoo.com (Benoit St-Jean) wrote in message news:<35**************************@posting.google. com>...
I am wondering if the "swap bug" is present on my kernel/version of
RedHat 9 as described at:
http://bugzilla.redhat.com/bugzilla/...g.cgi?id=89226

It looks like the OS prefers to fill the swap instead of releasing the
"unused" memory and use the available RAM. This problem is especially
present when starting the MySQL server and executing lots of big
queries... Swap file grows and grows and is never released even
though there is available memory.


I think it got fixed - when I switched to kernel 2.4.25 on my RH9, the
hard drive stopped thrashing like crazy which is what it used to do
any time I edited a very large image with GIMP.

Jan Bielawski
Jul 20 '05 #8
Jan
bs*****@yahoo.com (Benoit St-Jean) wrote in message news:<35**************************@posting.google. com>...
I am wondering if the "swap bug" is present on my kernel/version of
RedHat 9 as described at:
http://bugzilla.redhat.com/bugzilla/...g.cgi?id=89226

It looks like the OS prefers to fill the swap instead of releasing the
"unused" memory and use the available RAM. This problem is especially
present when starting the MySQL server and executing lots of big
queries... Swap file grows and grows and is never released even
though there is available memory.


I think it got fixed - when I switched to kernel 2.4.25 on my RH9, the
hard drive stopped thrashing like crazy which is what it used to do
any time I edited a very large image with GIMP.

Jan Bielawski
Jul 20 '05 #9
Jan
bs*****@yahoo.com (Benoit St-Jean) wrote in message news:<35**************************@posting.google. com>...
I am wondering if the "swap bug" is present on my kernel/version of
RedHat 9 as described at:
http://bugzilla.redhat.com/bugzilla/...g.cgi?id=89226

It looks like the OS prefers to fill the swap instead of releasing the
"unused" memory and use the available RAM. This problem is especially
present when starting the MySQL server and executing lots of big
queries... Swap file grows and grows and is never released even
though there is available memory.


I think it got fixed - when I switched to kernel 2.4.25 on my RH9, the
hard drive stopped thrashing like crazy which is what it used to do
any time I edited a very large image with GIMP.

Jan Bielawski
Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Benoit St-Jean | last post by:
I am wondering if the "swap bug" is present on my kernel/version of RedHat 9 as described at: http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=89226 It looks like the OS prefers to fill the...
1
by: Jeff Roughgarden | last post by:
We are hosting a 140 GB database on SQL Server Version 7 and Windows 2000 Advanced Server on an 8-cpu box connected to a 15K rpm RAID 5 SAN, with 4 GB of RAM (only 2 GB of which seem to be visible...
2
by: cnprasad | last post by:
Hello, I have ntoiced something peculiar happening on our db2 instance. It serves as the backend rdbms for a java application that is hosted on websphere app server. The app server has a...
9
by: Jongmin Lee | last post by:
Hi Everybody, I have very simple code snippet to explain my problem. Class "Swap" is construncted in "Main" with two initial variables. Later, "Swap" class is going to swap those two...
18
by: Joe Lester | last post by:
This thread was renamed. It used to be: "shared_buffers Question". The old thread kind of died out. I'm hoping to get some more direction by rephrasing the problem, along with some extra...
4
by: Niels Dekker (no reply address) | last post by:
When calling swap as follows (as recommanded in Effective C++, 3rd Edition, by Scott Meyers), what swap is chosen to be called? using std::swap; swap(a, b); Suppose there is a global ::swap...
9
by: ma740988 | last post by:
Consider: # include <vector> # include <iostream> # include <cstdlib> # include <ctime> bool ispow2i ( double n ) {
4
by: George2 | last post by:
Hello everyone, The following swap technique is used to make assignment operator exception safe (means even if there is exception, the current object instance's state is invariant). It used...
11
by: Dennis Jones | last post by:
Hi all, 1) Let's say you have two char 's of the same size. How would you write a no-fail swap method for them? For example: class Test { char s; void swap( Test &rhs ) {
0
Subsciber123
by: Subsciber123 | last post by:
Is it possible to disable a swap partition for normal memory usage but allow it to be used for suspend-to-disk? This would be useful in the case that a program decides to explode and use up all...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.