Can a huge amount of subdomains slow down apache ?

guschi2k

Member
Sep 11, 2003
11
0
151
Hi everyone,

maybe my feeling is wrong, but somehow it seems to me, that things run a lot slower since I created 1200+ subdomains for one of my domains. Especially the response time seems pretty slow. Is there a way to solve this problem ? I'm not exactly sure what causes the slowdown, maybe it's the huge amount of Virtual Host entries in httpd.conf ?

Any help is appreciated :)

Stefan
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,465
31
473
Go on, have a guess
I've heard that it can cause problems if you have very large numbers of VirtualHost directives in Apache, though I've only known that to happen with several thousand of them. I would guess the limit before performance is degraded depends on the speed and availability of resources on your server. For example, if you're running low on memory, CPU resources or have an I/O bottleneck, then this would only add to it.

There are ways to use mod_rewrite to effectievly create subdomains, but it won't give you log files and the other advantages of doing it through cPanel (e.g. email on the subdomain). Using mod_rewrite regex's in a .htaccess file you can have many thousands with little impact.
 

guschi2k

Member
Sep 11, 2003
11
0
151
thanks chirpy :) I don't need the cpanel features for those subdomains, so I'm going to have a look into the mod_rewrite thing and see if the speed increases.