Skip to main content

Posts

performance tuning - Apache HTTPD configuration for high load

Good day, I want to be able to serve at least 7000 (preferably 10k) concurrent requests from my Apache Httpd. I have configured my httpd.conf with MPM worker with the following setup ServerLimit 330 StartServers 25 ThreadsPerChild 25 MaxClients 7500 My Apache Httpd server does nothing except do a reverse proxy against a cluster of java app servers and some (disk) caching on some static items like HTML/CSS/JS. While trying to pound my system using JMeter (with about 1k concurrent requests), in a couple of minutes, my server starts to crash but it shows no additional information. My /etc/security/limits.conf is configured to * soft nofile 10000 * hard nofile 30000 apache soft nproc 8192 apache hard nproc 12288 * soft stack 512 * hard stack 1024 Any ideas how I can reach 7k (or preferably 10k) concu...

monitoring - Icinga Monitor Website for String

I am trying to use Icinga to monitor a website for a particular string. When I run the plugin from the command line, it seems to work fine, but in Icinga-Web, it always shows up as successful no matter what I enter for the string. #Doesn't Work - always returns ok define service { host_name mywebserver service_description Check Website servicegroups Websites check_command check_http!-s "no such string" -H www.mysite.com -u /apath/ -t 7 use generic-service notification_interval 60 ; set > 0 if you want to be renotified } The wierd thing is if I run the plugin located in /usr/lib/nagios/plugins/check_http as follows, it gives me what I would expect: ./check_http -H www.mysite.com -u "/apath/" -s "no such string" HTTP CRITICAL: HTTP/1.1 200 OK - string 'no such string' not found on... Why would this be? Answer Clearly yo...

ubuntu - Linux Raid: mystical md_d device

I have a 64bit Ubuntu Jaunty server (kernel 2.6.28-17-server) installed on two SATA disks (sdc and sde) in a mirror RAID, this being my current raid configuration: cat /proc/mdstat Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] md5 : active raid1 sdd7[1] sdc7[0] 126953536 blocks [2/2] [UU] md2 : active raid1 sdd3[1] sdc3[0] 979840 blocks [2/2] [UU] md0 : active raid1 sdd1[1] sdc1[0] 96256 blocks [2/2] [UU] md4 : active raid1 sdd6[1] sdc6[0] 9767424 blocks [2/2] [UU] md3 : active raid1 sdd5[1] sdc5[0] 979840 blocks [2/2] [UU] md1 : active raid1 sdd2[1] sdc2[0] 1951808 blocks [2/2] [UU] unused devices: none # df -h Filesystem Size Used Avail Use% Mounted on /dev/md4 9.2G 922M 7.9G 11% / tmpfs 490M 0 490M 0% /lib/init/rw varrun 490M 316K 490M 1% /var/run varlock 490M 0 490M 0% /var/lock udev 490M 228K 490M ...

linux - SPF Records for subdomain sharing mail server

I have two websites hosted on the same server. I set up the second site after I had already set up the first site and its corresponding email server. This is more of a DNS question. The first server has been working trouble free for a long time, and its SPF record checks out just fine and I send mail with no issues. I set up a second web server using an apache vhost, and I used iRedAdmin to set up a second email domain. The problem appears to lie with my SPF record, and whenever I send mail form the second domain, it gets flagged as spam. I've set it up using the original mail server as its MX, but I've never done two e-mail server on the same IP address and I'm not sure if I'm mucking it up. Here are the two SPF records for reference (hostnames obfuscated): This works fine: v=spf1 a mx a:server1.com mx:mail.server1.com ip4:x.x.x.x ~all This does not work: v=spf1 a mx a:server2.com mx:mail.server1.com ip4:x.x.x.x ~all And ideas? Server 2 insofar as mail is concer...

used (linux) memory not equal to sum of VmHWM? finding missing memory

I have a server (virtual) running Linux (Ubuntu 16.04 amd64). It has 8gb memory allocated, and it's all being used, but i don't know by what. root@server:~# free -k total used free shared buff/cache available Mem: 8176980 7892288 121580 22000 163112 94516 Swap: 1572860 206800 1366060 root@server:~# grep VmHWM /proc/*/status | awk 'BEGIN {tot=0} {tot+=$2} END {print tot}' 4293060 Why doesn't the sum of VmHWM sum up to something closer to 8GB? And how can i find out what is eating up memory (and causing the server to swap)? And is there some good site that explains Linux memory/resource usage in a detailed but clear way? :) Some more info: root@server:~# uname -a Linux server 3.13.0-67-generic #110-Ubuntu SMP Fri Oct 23 13:24:41 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux root@server:~# cat /proc/meminfo MemTotal: 8176980 kB MemFree: 151200 kB Buffers: 10420 kB Ca...

database - Third-party SSD solutions in ProLiant Gen9 servers

has anyone experience with using consumer SSDs like the Samsung 850 Pro in an HP ProLiant Gen9 server with a Smart Array P440ar controller? Judging by various reports about older versions (Gen6 to Gen8) third-party SSDs seem to work in principal, but might cause problems with the monitoring features of the server. I would like to know if this is still the case, or if it got better/worse. Some background information: We are looking for a development server for a team of 7 to 12 people. The server would host multiple VMs (Hyper-V) running SharePoint 2010 and 2013, potentially each with its own SQL Server installation. Our hardware guy advises strongly against using third-party drives, saying consumer SSDs would not run at all, and wants to use HP 10k SAS disks. I would prefer 8x 1 TB Samsung 850 Pro SSDs in a RAID 10 or 1 configuration (the 850s GC should be good enough so we can lose TRIM support). My take on this is: We do not need enterprise-level reliability and longevity, nor will t...

virtualhost - Apache cannot find virtual host if domain is the same as server FQDN

Within Apache I had a vhost set up with ServerName host1.example.com Within /etc/hosts there is an entry for host1 127.0.1.1 host1.example.com host1 And in /etc/hostname host1 This is the Debian/Ubuntu way of creating an FQDN. Apache seems to have a problem when serving content for a virtual host that has the same FQDN as the server itself. When running nginx with a vhost for host1.example.com it has no problem picking up the Host header and using the correct vhost. But when using Apache it has problems, it always uses 000-default. Deleting 000-default makes it switch to the next vhost and deleting all but the vhost file for the domain that I want to work finally makes it work. NameVirtualHost is set to * There are no error messages in the logs, no overlapping virtualhosts and the vhost config is perfectly fine. ServerAdmin webmaster@localhost ServerName host1.example.com DirectoryIndex index.php index.htm index.html DocumentRoot /var/www/host1.exam...

A CNAME record can't be set up for the domain root

I recently bought a new domain from namecheap and decided to delegate it to Yandex.Connect services, so I changed namecheap's DNS to custom, added Yandex' nameservers ( dns1.yandex.net and dns2.yandex.net ) in the control panel, added the proof and within a couple hours my domain was being managed by Yandex. Since I am hosting a personal site in my own premises and since my ISP doesn't sell any static IPs I decided to use DDNS. But when I tried to add a CNAME for @ that points to my-domain.example-ddns.org I found out it does... nothing. The record just isn't being created. I tried adding another one for a subdomain and it works perfectly fine. After reading Yandex' guides I read this: CNAME. Remember that a CNAME record can't be set up for the domain root, because this is prohibited by the RFC. Imagine my shock when I read such a thing, when at the same time I have another domain registered with namecheap, but using namecheap's basic DNS instead, wher...

raid - PERC, Caching with SSDs

We have a few servers with PERC H710s, we're moving to SSDs and I wonder, is caching needed given that we're not using spinning disks? Our general setup is as follows 2 X 2TB SSD in RAID 1 Read Policy: No Read Ahead. Write Policy: Write Through Disk Cache Policy: Disabled Is there any benefit to having caching enabled? Are there any issues we might face by not having caching enabled? Are we more likely to suffer data loss (that could be mitigated by having caching on) if a power outage were to happen and our BBUs somehow also failed?