• Resolved fantasts

    (@fantasts)


    I have a site with 500,000 registered users.
    I set
    Apc.shm_size=4G
    I saw a lot of caches of user information written to the database in mysql slowlog.

    I don’t feel very good. Can I turn off the L2 cache?

    # User@Host: darkanddark[darkanddark] @ localhost []
    # Thread_id: 55219252  Schema: darkanddark  QC_hit: No
    # Query_time: 1.774700  Lock_time: 0.000393  Rows_sent: 0  Rows_examined: 0
    # Rows_affected: 1  Bytes_sent: 13
    SET timestamp=1553189741;
    INSERT INTO wp_lcache_events ("pool", "address", "value", "created", "expiration") VALUES ('204.12.244.236-443', '10:VC18users:72124', 's:372:\"O:8:\"stdClass\":10:{s:2:\"ID\";s:5:\"72124\";s:10:\"user_login\";s:6:\"sutoka\";s:9:\"user_pass\";s:34:\"$P$BjtBSaHORfxfXHLFWFfregtrhb39Y.\";s:13:\"user_nicename\";s:6:\"sutoka\";s:10:\"user_email\";s:16:\"[email protected]\";s:8:\"user_url\";s:0:\"\";s:15:\"user_registered\";s:19:\"2017-04-26 18:28:54\";s:19:\"user_activation_key\";s:0:\"\";s:11:\"user_status\";s:1:\"0\";s:12:\"display_name\";s:6:\"sutoka\";}\";', 1553189729, NULL);
Viewing 1 replies (of 1 total)
  • Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    Hi @fantasts,

    It’s not easily possible to turn off the L2 cache.

    One thing you could consider as an alternative is disabling persistent object cache for the user cache groups:

    
    wp_cache_add_non_persistent_groups( [ 'users', 'userlogins', 'useremail', 'userslugs' ] );
    

    This means that user-related data will only persist for the length of the request, and won’t be written to the L2 cache.

    If you try this out though, you’ll want to keep a close eye on performance and resource utilization as it may or may not lead to better outcomes than what you already have.

    Hope this helps!

Viewing 1 replies (of 1 total)
  • The topic ‘Is the huge cache space suitable?’ is closed to new replies.