How to free Vmalloc memory on the fly

Posted on 2006-05-12
Last Modified: 2013-12-16
I'm using linux to record DVB directly to disk. My problem is that  when Vmalloc fills up it freeze DVB driver. I need to find a way to empty that Vmalloc the fly. So far only solution is to reboot the server and it's not a good solution.

[root@refrecord ~]# cat /proc/meminfo
MemTotal:      2076108 kB
MemFree:       1965880 kB
Buffers:          8328 kB
Cached:          63164 kB
SwapCached:          0 kB
Active:          41336 kB
Inactive:        46100 kB
HighTotal:     1179596 kB
HighFree:      1094488 kB
LowTotal:       896512 kB
LowFree:        871392 kB
SwapTotal:     3068404 kB
SwapFree:      3068404 kB
Dirty:              28 kB
Writeback:           0 kB
Mapped:          28632 kB
Slab:             8788 kB
CommitLimit:   4106456 kB
Committed_AS:    88064 kB
PageTables:       1432 kB
VmallocTotal:   114680 kB
VmallocUsed:     21168 kB                              <--  when this fills up, it server will crash
VmallocChunk:    93008 kB
HugePages_Total:     0
HugePages_Free:      0
Hugepagesize:     4096 kB
[root@refrecord ~]#
[root@refrecord ~]# uname -a
Linux refrecord 2.6.16-1.2108_FC4 #1 Thu May 4 23:52:01 EDT 2006 i686 i686 i386 GNU/Linux

Please, any suggestion

Question by:salmjuh
    LVL 43

    Accepted Solution

    So far I know(but may be wrong) VmallocUsed never shrinks(it's only top marker of virtual memory space)
    If it fills up, it may mean that Your kernel has a memory leak or want to use too much memory inside the kernel itself.
    Do You happen to load third party kernel module? Sure it behaves OK.
    LVL 22

    Assisted Solution

    Oooooh - this is baaaaaaaaddddd....!!!!!
    As ravenpl has pointed out, VmallocUsed never goes down, and continued increase is most likely due to either a kernel memory leak or their being some very poorly written code that you are using for recording your DVB.

    I notice that you are using FC4. FC is used to test 'bleeding edge' ideas. Can I suggest that you try a kernel rebuild without the 'cutting edge' capabilities:

    Alternatively, try one of the RHEL clones:



    Their kernels only include the 'well tried and tested' elements in kernel, and shouldn't 'leak' as you seem to be experiencing.

    LVL 43

    Expert Comment

    > Their kernels only include the 'well tried and tested' elements in kernel, and shouldn't 'leak' as you seem to be experiencing.
    Started using RHEL43 - not really true. Many bugs that are already patched in vanilla(including some security flaws)
    LVL 22

    Expert Comment

    I'd also like to retract that statement as I'm now a little embarrassed by it. - Discovered that Xen is in there as well! - Hardly tried and tested. You have to ask yourself whether Redhat is now involved in 'feature' races with other distros! I think that a different ideology is now being used to develop the Redhat product.

    (   (()
    (`-' _\
     ''  ''

    Featured Post

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
    Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now