Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    What is dentries and Inodes ?


    To clear the cache memory, we use the following commands :

    Flush file system buffers by executing,

    # sync : what does sync command Do ? Why should we use it before using the # echo 1 > /proc/sys/vm/drop_caches ?

    To free page cache:

    # echo 1 > /proc/sys/vm/drop_caches

    To free dentries and inodes:

    # echo 2 > /proc/sys/vm/drop_caches

    To free page cache, dentries and inodes:

    echo 3 > /proc/sys/vm/drop_caches

    What is dentries and Inodes ?

    Can any body explain this Please....?


  2. #2
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    try here ...

  3. #3
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    3rd rock from sun - Often seen near moon
    Jonathan183 link should give lot of info. Here is some short info about them.
    # sync : what does sync command Do ?
    sync flushes the buffer into disk.It forces completion of pending disk writes.

    create 10000 files like

    mkdir test && for i in {1..10000};do date > test/$i ;done
    Now do
    time cat test/*
    Note the sys time.Run the time cat test/* again.Check sys time,is that reduced ? that because of page cache.

    Now drop page cache

    # echo 1 > /proc/sys/vm/drop_caches
    Now run time cat test/* again.See its increased.

    Do the similar thing run
    time ls -l test
    Note the sys time,run it again ,you should see
    time decreasing.

    Now drop the caches of dentries and inodes:

    # echo 2 > /proc/sys/vm/drop_caches
    Run check ls time again.

    cache in general is used for performance optimization.i.e no need to go and fetch the data from hard-disk.It will place the frequently accessed data into physical memory

    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    FOSS India Award winning ext3fs Undelete tool Online Linux Terminal

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts