Mohon bantuan skrip flush memory otomatis

Discussion in 'Dedicated Server dan Colocation' started by nyoman kesuma, 6 May 2013.

Thread Status:
Not open for further replies.
  1. nyoman kesuma

    nyoman kesuma Poster 1.0

    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    Mohon Bantuannya Tuan2,

    Gimana cara buat skrip flush memory, biar bisa kita set perjam/perhari nya bisa flush otomatis.


    Thanks
     
  2. jaapns

    jaapns Hosting Guru Web Hosting

    Messages:
    3,257
    Likes Received:
    442
    Trophy Points:
    83
    flush memory VPS kah ?

    kalo saya ga salah nangkap untuk flush memory di vps , saya biasa pake ini :

    bikin file nya clearcache.sh ( pake touch )

    isi dengan :
    #!/bin/sh
    sync; echo 3 > /proc/sys/vm/drop_caches


    save

    jalankan di crontab -e : 0 * * * * /root/clearcache.sh

    itu sejam sekali , kalo mau sehari sekali ya tinggal di setting nya cron itu, filenya di chmod 755

    semoga tidak salah persepsi
     
  3. nyoman kesuma

    nyoman kesuma Poster 1.0

    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    Betul Tuan di vps,

    Terima kasih Tuan replaynya...sangat membantu
     
  4. cpserv

    cpserv Expert 1.0

    Messages:
    866
    Likes Received:
    123
    Trophy Points:
    43
    memory yg sebelah mana?

    Code:
    ~$ free -m
                 total       used       free     shared    buffers     cached
    Mem:           501        467         34          0         39        299
    -/+ buffers/cache:        129        372
    Swap:         1021          0       1021
    klo dari result itu, penggunaan memorynya brapa?
     
  5. nyoman kesuma

    nyoman kesuma Poster 1.0

    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    Memory free nya nambah lagi...misal tadi 34 bisa naik lagi diatas 34 lagi....
     
  6. cpserv

    cpserv Expert 1.0

    Messages:
    866
    Likes Received:
    123
    Trophy Points:
    43
    kenyataannya baru terpakai 129 dan masih sisa 372MB.

    Code:
    -/+ buffers/cache:        129        372
    udah umum sistem operasi *Nix ngambil semua resource memory buat buffer sama cache biar proses bisa dieksekusi dengan lebih cepat. referensi
     
  7. Fuji Ahmad

    Fuji Ahmad Apprentice 2.0

    Messages:
    460
    Likes Received:
    61
    Trophy Points:
    28
    kalo memory nya di flus terus, performace server berkurang,,, mending RAM nya dip upgrade jika sudah over.
     
  8. mustafaramadhan

    mustafaramadhan Hosting Guru

    Messages:
    3,237
    Likes Received:
    857
    Trophy Points:
    113
    Jangan pakai 'sync; echo 3 > /proc/sys/vm/drop_caches' tapi 'sync; echo 1 > /proc/sys/vm/drop_caches'.

    Pakai 'echo 3' akan bermasalah bisa bermasalah dengan services tertentu (misalnya php-fpm). Pakai 'echo 1' jauh lebih aman.
     
Loading...
Thread Status:
Not open for further replies.

Share This Page

Loading...