1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Large Memory Cache Issues

Discussion in 'Site & Server Administration' started by JokerJill, Jan 5, 2020.

  1. #1
    Hello linuxers,

    I'm running a CentOS server (specs below) with 32 GB memory. My problem is 18.49 GB of the 32GB is used by cache. That seems to be a lot. Is that a good thing or cache is using too much? I'm running a cryptocurrency website. I cache a lot of stuff because I'm using API to pull cryptocurrency prices like the ones on this page: https://www.cryptozink.io/live-cryptocurrency-coins-prices/.

    Is cache keeping the site from running out of memory or it's using too much and I should I reduce the number of pages cache? If I don't cache so much, will my the site slows down?

    Specs:

    OS: CentOS Linux 7.7.1908 (Core)

    CPU: Intel(R) Xeon(R) CPU E3-1225 v3 @ 3.20GHz (4 core(s))

    PLSK.05980134.0003

    System Uptime: 3 day(s) 09:58

    Total memory: 31.17 GB

    Used: 20.04 GB

    Cache: 18.49 GB
     
    JokerJill, Jan 5, 2020 IP
  2. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,151
    Likes Received:
    1,656
    Best Answers:
    29
    Trophy Points:
    475
    #2
    What does your error_log say? If you're running out of memory it will say that. I am not exactly sure what it will be like in your case, you may get blank pages.
     
    qwikad.com, Jan 6, 2020 IP
  3. JokerJill

    JokerJill Greenhorn

    Messages:
    6
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    13
    #3
    There are no errors in the error logs. I'm just worrying Cache is hoarding my memory.
     
    JokerJill, Jan 6, 2020 IP
  4. JEET

    JEET Notable Member

    Messages:
    3,825
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #4
    I don't know how cryptocurrency websites work, but if you are worried about running out of memory, then write a code to clear cached files which are somewhat old.
    That way files which were created and accessed sometime back not in use anymore, will get deleted and memory will be freed.
     
    JEET, Jan 7, 2020 IP
  5. JokerJill

    JokerJill Greenhorn

    Messages:
    6
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    13
    #5
    Thank you. I'll try to clear the cache and see what happens.
     
    JokerJill, Jan 7, 2020 IP
    JEET likes this.
  6. JEET

    JEET Notable Member

    Messages:
    3,825
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #6
    Did you downloaded this huge currency script from somewhere, along with cache files?
    Or was the cache created on your server after script install?

    If it was not created on your server, then do not delete. May be it came with the script and script is still using those files for some function.
    I really do not know anything about krypto stuff...


    My understanding of cache files is that these are temporary files, created to save server load.
    On my server, I cache webpages which were generated using php and MySQL to reduce MySQL server load.
    I can keep these files for 4-5 hours, serve these cached files when someone visits the site, and then delete all cache when new finance data is available to MySQL.
    Then PHP script rebuilds cache, and new webpages are served.

    If you have not coded your krypto script, then its better to ask the coder what those cache files are, and if its ok to clean it up once in a while.
     
    JEET, Jan 7, 2020 IP
  7. JokerJill

    JokerJill Greenhorn

    Messages:
    6
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    13
    #7
    The live crypto price script is a wordpress plugin. The cache is also a wordpress plugin.
     
    JokerJill, Jan 7, 2020 IP
    JEET likes this.
  8. JEET

    JEET Notable Member

    Messages:
    3,825
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #8
    Is the plugin one of these?
    https://colorlib.com/wp/cryptocurrency-wordpress-plugins/


    The easiest way to see what will happen is,
    1. Rename "cache" folder to something else.
    2. Create a new empty "cache" folder, give it writable permissions.
    3. Open a couple of your website pages which are displaying krypto info.

    If those old cache files were somehow being used, then your website will stop functioning and you will see errors or empty pages.
    In this case, remove the "new CACHE" folder, rename old one back to "cache" and all will be fine.

    If websites opens up properly, and you can see some new files in new cache folder, then its safe to delete the "old cache" folder, which you renamed, which was 18GB in size.
    Your cache plugin will recreate files in new folder.

    I am thinking that cache and krypto are 2 different plugins, not dependant on each other.

    Those files in cache folder are simply wordpress pages that were successfully delivered to browser, so they were saved for re-delivery when next visitor wants to see same page.
    Your cache plugin will create them again.

    However, I also think that this cache plugin is not a very good one.
    Its probably going on creating new files without deleting old ones automatically.
     
    JEET, Jan 7, 2020 IP
  9. JokerJill

    JokerJill Greenhorn

    Messages:
    6
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    13
    #9
    I found he API creating all the cache sucking my RAM. It's this page with the exchanges listing plugin. https://www.cryptozink.io/exchanges/. Thank for your help.
     
    JokerJill, Jan 7, 2020 IP
    JEET likes this.
  10. JEET

    JEET Notable Member

    Messages:
    3,825
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #10
    You should not deactivate cache completely specially if using third party APIs.
    APIs have restrictions, and caching results of API calls allows you to save data and reuse it, instead of sending new API call each time someone opens website.

    You can remove the cache files after a while, script will recreate it.
     
    JEET, Jan 7, 2020 IP
  11. JokerJill

    JokerJill Greenhorn

    Messages:
    6
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    13
    #11
    I did not deactivate it. I created a cron task to clear it every night.
     
    JokerJill, Jan 7, 2020 IP
    JEET likes this.
  12. Lewis Krollinger

    Lewis Krollinger Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #12
    Hello Guys,
    i want to upgrade my ram due to slow performance of my PC but I'm unsure about identifying the right one that's compatible. The model of my PC is Dell Inspiron 15 3000 Series. While delving into online research, I came across a configurator that promises to aid in selecting the appropriate RAM https://www.compuram.de/blog/raminator/. Have any of you utilized similar tools previously, and can I trust them to guarantee compatibility with the RAM? Many thanks in advance
     
    Lewis Krollinger, Mar 17, 2024 IP