Re: how to efficient use linux caches

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

 



hi all:
Thanks for your reply :)
2010/11/1 Rajat Sharma <fs.rajat@xxxxxxxxx>:
>> what kind of system call will increase the size of cache?
>
> be clear about which cache? Are you interested in dentry cache, inode cache
> or page cache? dentry cache and inode cache can grow only by access to
> filesystem, access multiple files on your system. For page cache increase,
> you can simple copy a very large file say 1G.
> Rajat
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, so I want to know
1. is there any function call that will increase cache usage I need to
pay attention.
2. is there any function which help me to clean the caches
3. can I limit the size of cache or memory when some process, or pid,
try to allocatte?

>
> I didnt get the purpose of your test program, perhaps you want to put memory
> pressure on your system. What your test program is doing is just calling
> malloc, it does nothing but grow the virtual memory area of your heap, It
> wont allocate physical pages until you access the virtual address, try to
> write some bytes on each allocated memory such that each 4K page is
> accessed. This results in page vault in kernel and since your address is
> valid so it will allocate a page for you. Typically called Demand Paging.
>
> If you really want to put memory pressure, try allocating memory in kernel
> through kmalloc.
I write this test program is try to find out which function call will
effect the size of cache.

appreciate your help,
miloody

--
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