Warning: include(.../cache/template/template63867.php): failed to open stream: No such file or directory in /home/codingta/public_html/includes/vb5/template.php on line 328 Warning: include(): Failed opening '.../cache/template/template63867.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/codingta/public_html/includes/vb5/template.php on line 328 simple tip to keep a server running smooth - Coding-Talk

simple tip to keep a server running smooth

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • simple tip to keep a server running smooth

    before i start note this WONT WORK ON A VPS

    okay lets start the command is quite simple

    Code:
    echo 3 > /proc/sys/vm/drop_caches
    many of you will ask what does it do?
    simple it clears the ram cache for example here i have it where i did it

    Code:
    root@ns1 [~]# free -m
                 total       used       free     shared    buffers     cached
    Mem:     7993       7839        154          0         62       6804
    -/+ buffers/cache:        971       7021
    Swap:         2046          0       2046
    root@ns1 [~]# echo 3 > /proc/sys/vm/drop_caches
    root@ns1 [~]# free -m
                 total       used       free     shared    buffers     cached
    Mem:     7993        885       7107          0          2         45
    -/+ buffers/cache:        837       7156
    Swap:         2046          0       2046
    root@ns1 [~]#
    please not the numbers under "used" first it says used 7839 then it says used 889

    now we dont want to have to do this everytime do we?

    so we open up a shell console as root and type
    Code:
    crontab -e
    this will open a editor with all cronjobs running as root now we past this in
    Code:
    */10 * * * * echo 3 > /proc/sys/vm/drop_caches
    this will run the command every 10 minutes and your ram stays nice and clean which speeds the server up
    have fun

  • #2
    Thanx It helped my server alot

    Comment


    • #3
      you are very welcome

      Comment

      Working...
      X