系统性能分析调整及方法
系统性能分析和性能调整的方法和步骤,其中一些方法很新,尤其是USE 方法。性能分析调整方法性能监测、排队理论,以及容量规划会在本章后面部分有所覆盖。后面的各章会在不同的环境中使用这些方法,对于特殊的性能分析领域还会使用一些特定的方法。一、街
/ 设置 10 秒超时 // 每日统计清 0 runtime_set('todaycomments', 0); runtime_set('todayarticles', 0); runtime_set('todayusers', 0); if ($forumlist) { $fidarr = array(); foreach ($forumlist as $fid => $forum) { $fidarr[] = $forum['fid']; } forum_update($fidarr, array('todayposts' => 0, 'todaythreads' => 0)); } // 清理临时附件 attach_gc(); // 当天24点 $today = strtotime(date('Ymd')) + 86400; runtime_set('cron_2_last_date', $today, TRUE); // 往前推8个小时,尽量保证在前一天 升级过来和采集的数据会很卡 // table_day_cron($time - 8 * 3600); cache_delete('cron_lock_2'); } } } ?>