Through the Yslow plugin of Firefox (depends on having Firebug too) I arrived at this page:
http://yuiblog.com/blog/2007/04/11/performance-research-part-4/
. It’s 2007, it may have changed a lot since the publication, but it presents a study on exactly what you asked.
In summary:
It starts from the principle that increasing the number of domains should improve the time it takes to load all the requested elements, because the HTTP/1.1 specification suggests that browsers should download two components in parallel by hostname (pointed out by Henrique above). This limit can be changed via configuration in both I.E. and Firefox (no other information), but anyone who moves the server will not configure any client browser, and the way to configure is not very user-friendly.
Only the results of his test were not exactly as expected. It has two tests, 20 images each, being a small and other medium images. Both had an improvement in the increase from 1 to 2 hosts, but the small images did not have a significant impact by increasing the number of hosts and the average images had a negative impact! With 3 hosts it was worse than with 1 host. At the end he comes to the conclusion that the best should be 2 to 4 hosts.
The CDN that Vinicius cited helps a lot too, trying to narrow the distance between the client’s browser and the source of the requested content.
Another reason to place more hosts would be to have hostname(s) with dynamic content and other(s) with static content, using content expiration header to be cached, but this can be done in a single hostname through configuration with the mod_expires module of apache for example.
If the intention is to know what to improve on a page to make it faster or lighter, Firefox with Firebug and Yslow can help a lot, I do not know similar tool in other browsers, but there must be.
If you have resources available for testing, Safari (at least on OS X) has a very good feature of timing the time it takes to load a page indicating each action. I’m not sure, but I think I’ve seen this in Chrome on Windows too.
Cookies delay the download yes. When a request is made to
subdominio.meusite.com
, the browser sends (uploads) all existing cookies tosubdominio.meusite.com
andmeusite.com
, and in Sponse is also made the download of this data (+ details). That’s why large websites use different domains (not sub-domains) to serve static content, such as Google apps, which usegoogleusercontent.com
.– danguilherme