搜索""的结果
lnmp已经成为比较流行的网站服务器端技术配备。越来越多的人开始不满足于能使用nginx,更多人开始关注如何能优化nginx的处理能力。使用nginx的目的就是为了提高并发处理能力,但是看到有部分人本机部署lanmp,在同一台机器上使用nginx方向代理apache,就有种脱裤子放屁的感觉。在window下运行nginx,还要跑出好的效果,同样是个伪命题,windows下的select模型注定nginx效率不会太高。最近看了篇英文文章,结合自己理解,写给大家看看吧。优化nginx包括两方面:1.是自己重写nginx代码(比如tengine)、本身nginx的代码已经足够优秀,如果不是每秒几千的请求,就忽略这个部分吧。2.另一个就是和优化nginx的配置,这是中小型网站可以重点优化的部分。nginx的配置文件是一种声明式定义,控制nginx的每一个细节。所谓负载调优,就是提高单台机器处理效率,降低单台机器的负载。为了提高单台机器的处理效率,cpu的处理速度是足够快的,我们能解决的就是降低磁盘I/O、网络I/O,减少内存使用。降低单台机器的负载我们能做的就是负载均衡,把流量打到多台机器处理。nginx推荐优化内容:1.open files数量优化ulimit -a查看系统参数其中open files (-n) 1024表示系统同时最多能打开的文件数...
nginx优化 实现10万并发访问量一般来说nginx配置文件中对优化比较有作用的为以下几项:worker_processes 8;1 nginx进程数,建议按照cpu数目来指定,一般为它的倍数。worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 0010000001000000 10000000;为每个进程分配 cpu,上例中将 8 个进程分配到 8 个 cpu,当然可以写多个,或者将一个进程分配到多个cpu。worker_rlimit_nofile 102400;这个指令是指当一个nginx进程打开的最多文件描述符数目,理论值应该是最多打开文件数(ulimit -n)与nginx进程数相除,但是nginx分配请求并不是那么均匀,所以最好与ulimit-n的值保持一致。use epoll;使用epoll的I/O模型,这个不用说了吧。worker_connections 102400;每个进程允许的最多连接数,理论上每台 nginx 服务器的最大连接数为worker_processes*worker_connections。keepalive_timeout 60;keepalive超时时间。client_header_buffer_size 4k;客户端请求头部的缓冲区大小,这个可以根据你的系统分页大小来设置,一般一个请求头的大小不会超过 1k,不过由于一般系统分页都要大于 1k,所以这里设置为分页大小。分页大小可以用命令getconf PAGESIZE取得。open_file_cache ...
Monitoring disk I/O using ZabbixDennis / February 2, 2014 How to set up disk monitoring on Linux in Zabbix. The standard Linux template in Zabbix provides monitoring on the filling of your disks, but not too much about real utilisation. For example, it doesn’t tell you how many writes per second are being handled by a disk or partition.However, this kind of information can be vital for the health of your servers. Disks are almost always a bottleneck, so I like to keep an eye on them.The inspiration for this blogpost and some code is from Renaldo Maclons’ weblog.Goal:Monitor the utilisation of my disk devices in Linux servers. Being lazy as a sysadmin is always a good thing, so I’m going to implement low-level discovery of my disk devices and create a template to go with it.We’ll be configuring the Zabbix agent which is running on my Linux boxes to support the low-level discovery of my disk devices, and the items we need to monitor on the host.For the quick-starters:1. Downlo...
Zabbix上硬盘IO监控 基本原理:通过分析/proc/diskstats文件,来对IO的性能进行监控。解释如下:+++++++++++++++++++++++++++对/proc/diskstats的解释++++++++++++++++++++++++++++++++++++++++++++[root@localhost bin]# cat /proc/diskstats | grep sda | head -18 0 sda 73840 10263 3178156 91219 1110085 4192562 42423152 1275861 0 447798 1366379第一至第三个域,分别是主设备号,次设备号,设备名称第4个域:读完成次数 ----- 读磁盘的次数,成功完成读的总次数。(number of issued reads. This is the total number of reads completed successfully.)第5个域:合并读完成次数, 第9个域:合并写完成次数。为了效率可能会合并相邻的读和写。从而两次4K的读在它最终被处理到磁盘上之前可能会变成一次8K的读,才被计数(和排队),因此只有一次I/O操作。这个域使你知道这样的操作有多频繁。(number of reads merged)第6个域:读扇区的次数,成功读过的扇区总次数。(number of sectors read. This is the total number of sectors read successfully.)第7个域:读花费的毫秒数,这是所有读操作所花费的毫秒数(用__make_request()到end_that_request_la...
如何用zabbix来监控磁盘IO 原作者博客地址: http://www.muck.net/19/getting-hard-disk-performance-stats-from-zabbixhttp://www.muck.net/pub/zabbix_FileServer_template.xmlI like zabbix… but it annoys me that it’s ops per second, and bytes per second data is broken for hard drives in the linux 2.6 kernel. So I created a work around Add the following code to your zabbix_agentd.conf file (/etc/zabbix/zabbix_agentd.conf by default), and restart the zabbix agent:UserParameter=custom.vfs.dev.read.ops[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$4}'UserParameter=custom.vfs.dev.read.ms[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$7}'UserParameter=custom.vfs.dev.write.ops[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$8}'UserParameter=custom.vfs.dev.write.ms[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$11}'UserParameter=custom.vfs.dev.io.active[*],cat /proc/diskstats | grep $1...
zabbix server收不到本机agent信息Cenots6.6 安装好zabbix server与zabbix agent后,测试 别的机器zabbix agent可以在server端 收到数据,并可以正常使用。可以服务器本机去一直收不到 zabbix server的模板数据。检查配置一切正常。最后发现,我的centos 主机名是 zabbix.tg,可以/etc/hosts 主机里面,并没有添加主机名与127.0.0.1的对应信息。添加 后,再将zabbix添加主机的名称换成zabbix.tg ,然后将,zabbix-agentd.conf 配置文件的hostname 换成 zabbix.tg。然后添加 后,重启相关服务后,发现 zabbix server 正常上线了。
在服务器密钥交换握手信息中 SSL 收到了一个弱临时 Diffie-Hellman 密钥。 (错误码: ssl_error_weak_server_ephemeral_dh_key)
这是因为您访问的站点的证书本身存在问题,建议您优先联系管理员进行修正,不过您也可以先安装扩展:disable dhe,以便您能临时访问下该站点。 希望我的回答对您有所帮助,如有疑问,欢迎继续咨询我们。
CloudStack_4.4_安装Centos6.6x86_64+CloudStack4.4.2+NFS+XenServer6.2
Supported CPU ModelsFedora 19 supports the use of the following QEMU CPU model definitions:Opteron_G4AMD Opteron 62xx (Gen 4 Class Opteron)Opteron_G3AMD Opteron 23xx (Gen 3 Class Opteron)Opteron_G2AMD Opteron 22xx (Gen 2 Class Opteron)Opteron_G1AMD Opteron 240 (Gen 1 Class Opteron)SandyBridgeIntel Xeon E312xx (Sandy Bridge)NehalemIntel Core i7 9xx (Nehalem Class Core i7)PenrynIntel Core 2 Duo P9xxx (Penryn Class Core 2)ConroeIntel Celeron_4x0 (Conroe/Merom Class Core 2)WestmereWestmere E56xx/L56xx/X56xx (Nehalem-C)3.2.1. Guest CPU modelsHistorically, CPU model definitions were hard-coded in qemu. This method of defining CPU models was inflexible, and made it difficult to create virtual CPUs with feature sets that matched existing physical CPUs. Typically, users modified a basic CPU model definition with feature flags in order to provide the CPU characteristics required by a virtual machine. Unless these feature sets were carefully controlled, safe migration — which re...
Running Mac OS X as a QEMU/KVM GuestGabriel L. SomloLast updated: Mon. May. 04, 2015Feedback to: somlo at cmu dot edu0. I Just Want It Working, Right Now !OK, here's what you'll need (or skip to the technical details instead):Development Tools: git, gcc[-c++], [auto]make, iasl, kernel-devel, etc. On Fedora, yum install @development-tools acpica-tools kernel-devel
should take care of it. But, if following the rest of the directions below, you get weird build failures and other unexplained errors, consider the possibility that you're missing something in this category, possibly something I didn't think of listing explicitly above...KVM: As of kernel version 3.15, all necessary functionality is already integrated upstream. Right now, I have 3.15.3-200.fc20.x86_64 on my Fedora 20 machine, and everything works out of the box.For older kernels, it may be possible to build KVM kernel modules using the kvm-kmod "wrapper", by following these instructions.Then, as root, while still i...
最新评论