我知道亚马逊限制微型实例,如果它占用一定的cpu时间,但我不认为这是事实。 所有尖峰出现在UTC时间大约6:30到6:40。 我检查了我的cron工作,那个时候没有任何计划:
@reboot ~/path/to/script1.sh >> ~/log/cron.log 0 13 * * * ~/path/to/script2.sh >> ~/log/cron.log
还有什么呢?
PS:注意cpu利用率下拉列表被设置为“最大”。 该图看起来与“平均”类似。 PPS:这个实例是2实例负载平衡设置的一部分。
在远程服务器的后台运行mvn exec
瘦服务器不能在Amazon Ec2上的生产模式(实时)上工作
增加AWS EC2 ubuntu实例磁盘空间
当我在我的amazon ec2微型实例中遇到“MysqLd dead,subsys locked”时该怎么办?
jenkins从事EC2失败的Windows Server 2016
以下是我的/etc/cron.daily里面的内容(其他cron是空的):
apport,apt,aptitude,bsdmainutils,dpkg,logrotate,man-db,mlocate,passwd,stream行竞赛,标准,update-notifier-common
如何解决亚马逊EC2 Linux上的httpd冲突?
缺less/var/lib/MysqL/MysqL.sock文件
错误,而gem安装在Ubuntu 12.04 aws ec2
为什么相同的JAVA程序在Windows和Linux等不同平台上的工作方式不同?
通常情况下,亚马逊的Ubuntu AMI在早上安排了/etc/cron.daily下的日常cron作业。 这个计划是使用/etc/crontab来管理的。 以下是/etc/crontab示例的样子:
$ cat /etc/crontab # /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields,# that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # mh dom mon dow user command 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) #
显然,每天的工作时间是早上六点二十五分。 如果这影响了服务器的直接交付,您可能需要调整这些设置以将日常任务转移到其他时间。 此外,您可以调查/etc/cron.daily下的项目。 对我来说,它看起来像:
$ ls /etc/cron.daily/ apport apt aptitude bsdmainutils dpkg logrotate man-db mlocate popularity-contest standard
除此之外,通常man-db和logrotate可能占用主要的cpu时间来执行。 这些是标准任务,可以调整以获得最佳性能。 您可能想要调整您的logrotate和man-db策略。
希望这可以帮助。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。