Re: how to efficient use linux caches

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

 



Hi...

Let's see if I can help ...

On Mon, Nov 1, 2010 at 19:48, loody <miloody@xxxxxxxxx> wrote:
> I am debugging a user mode program which is used to play multimedia.
> The size of cache memory is growing so high while playing files and
> that makes my kernel become slow

cache grows at that situation is acceptable....but "slow"? what was
slow? choppy sound playback?

>so I want to know
> 1. is there any function call that will increase cache usage I need to
> pay attention.

every functions that read files from block device will do....unless
you do direct I/O or XIP (eXecute In Place)

> 2. is there any function which help me to clean the caches

check the handler(s) of /proc/sys/vm/drop_caches...that would be the hint...

> 3. can I limit the size of cache or memory when some process, or pid,
> try to allocatte?

cache? uhm... AFAIK there isn't such tunable...or maybe you can take a
look on cgroups...who knows it is doable via cgroups.

but regarding the size of memory allocated for a program or programs
launched by a user, you can check ulimit and/or cgroups.


-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux