Lot of free memory and less cache

IO

Active Member
#1
I don't know if it is lsws (2.1.3) but :

When I upgrade RHEL4 to the latest kernel (2.6.9-22.ELsmp), the free memory switch from 16-20 Mb to 400-700 Mb.

The cached memory was before ~1.4 Gb and now there is ~800 Mb max.

On servers with few requests the cached memory take all the free memory in only 15 minutes. No problem here.

But on servers with 200 to 300 requests/s (30-50 lsphp or phpfcgi resquests/s) the free memory is always highter than 400 Mb and disk seeks increase.

Code:
# cat /proc/meminfo

MemTotal:      2074756 kB
MemFree:        715144 kB <--
Buffers:         14276 kB
Cached:         885584 kB
SwapCached:          0 kB
Active:         740020 kB
Inactive:       541784 kB
HighTotal:     1179392 kB
HighFree:         4224 kB
LowTotal:       895364 kB
LowFree:        710920 kB <--
SwapTotal:     3145704 kB
SwapFree:      3145560 kB
Dirty:           31948 kB
Writeback:           0 kB
Mapped:         481468 kB
Slab:            57144 kB
Committed_AS:   791908 kB
PageTables:       7432 kB
VmallocTotal:   106488 kB
VmallocUsed:      4472 kB
VmallocChunk:   101088 kB
HugePages_Total:     0
HugePages_Free:      0
Hugepagesize:     2048 kB


# iostat -k -d 1

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
sda              27.61       152.39        91.52   18590814   11164161
sdb              28.58       254.21        95.11   31011889   11602960
sdc              23.08       425.46       369.45   51902529   45069408

sda              33.00       132.00         0.00        132          0
sdb              80.00       460.00         0.00        460          0
sdc              41.00       132.00        32.00        132         32

sda              45.63       186.41         0.00        192          0
sdb              50.49       213.59         0.00        220          0
sdc              15.53        62.14         0.00         64          0

sda              34.65       138.61         0.00        140          0
sdb             276.24      1128.71         0.00       1140          0
sdc              18.81        75.25         0.00         76          0

sda              25.00       100.00         0.00        100          0
sdb              62.00       552.00         0.00        552          0
sdc               8.00       104.00         0.00        104          0
If I manually do some actions on files, the freemem decrease to 16-20 Mb, It's ok. But just after that the freemem grow from 2 to 5 Mb/s and the cached memory lose that memory. :?
My webservers use a lot of files, mysql too. This memory problem decrease performances.

I don't use special kernel tweaks and the lsws configuration I use is not exotic... I have this problem on 5 servers. They run mainly lsws/lsphp and some mysql.

Do you know where the problem come from or if it is lsws or not ?

Thank you.
 

mistwang

LiteSpeed Staff
#2
I don't think lsws has anything to do with the cache memory, it is completely controled by OS Kernel. It should be the kernel.

Please upgrade to 2.1.4, as 2.1.3 might have problem with PHP due to insufficient default resource limit configuration.
 

IO

Active Member
#3
I downgrade my kernel from 2.6.9-22.ELsmp to 2.6.9-11.ELsmp and the memory manager is now 'normal'... I don't understand, but I let it to the old kernel (load/2, all memory cached, less disk seek...)
 
Top