Jump to content

how to speed up things ?


Recommended Posts

the os: FreeBSD 8.2-RELEASE-p9 FreeBSD 8.2-RELEASE-p9

last pid: 44015;  load averages:  0.10,  0.05,  0.01  up 124+01:02:40    16:26:55
273 processes: 2 running, 271 sleeping

Mem: 418M Active, 642M Inact, 280M Wired, 24M Cache, 211M Buf, 593M Free
Swap: 512M Total, 40K Used, 512M Free
 PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME   WCPU COMMAND
43501 xxxx         1  46    0   140M 52924K piperd  0   0:11  9.67% php-cgi

i get this one : http://www.kimsufi.com/fr/ the KS 2G

the top :

ast pid: 44354; load averages: 0.05, 0.04, 0.00 up 124+01:07:53 16:32:08
275 processes: 1 running, 274 sleeping
CPU: 0.0% user, 0.0% nice, 0.2% system, 0.0% interrupt, 99.8% idle
Mem: 422M Active, 642M Inact, 281M Wired, 24M Cache, 211M Buf, 587M Free
Swap: 512M Total, 32K Used, 512M Free
PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
1304 mysql 14 44 0 724M 166M ucond 0 16:36 0.00% mysqld
46628 squid 1 44 0 29688K 16728K kqread 0 5:44 0.00% squid
332 _pflogd 1 44 0 7088K 1452K bpf 0 4:33 0.00% pflogd
1385 root 1 76 0 6920K 1344K nanslp 0 1:21 0.00% cron
78267 bind 5 44 0 33652K 23484K kqread 0 0:50 0.00% named
615 root 1 44 0 5992K 1340K select 1 0:43 0.00% syslogd
41300 xxxx 1 44 0 134M 52628K accept 1 0:43 0.00% php-cgi
90327 www 27 44 0 82748K 25396K accept 1 0:26 0.00% httpd
90452 www 27 44 0 45884K 11272K accept 1 0:25 0.00% httpd
90324 www 27 44 0 45884K 11016K accept 1 0:25 0.00% httpd
90467 www 27 44 0 43836K 10120K accept 1 0:25 0.00% httpd
90323 www 27 44 0 45884K 11880K accept 1 0:24 0.00% httpd
90321 root 1 44 0 34236K 5212K select 0 0:16 0.00% httpd
43501 xxxx 1 45 0 138M 54220K accept 1 0:14 0.00% php-cgi
78643 root 1 44 0 6112K 1572K kqread 1 0:12 0.00% master
78645 postfix 1 44 0 6112K 1704K kqread 0 0:10 0.00% qmgr
75545 opendkim 3 76 0 17276K 4840K sigwai 1 0:09 0.00% opendkim
90322 root 1 44 0 33984K 4972K select 0 0:09 0.00% httpd
49942 resonance 1 47 0 132M 26668K accept 0 0:02 0.00% php-cgi
59998 xxxxx 1 44 0 28768K 3740K select 1 0:02 0.00% sshd
49943 resonance 1 48 0 138M 26968K accept 1 0:02 0.00% php-cgi
1374 root 1 44 0 25132K 3352K select 0 0:01 0.00% sshd
76795 xxxxx 1 44 0 73560K 12480K select 0 0:00 0.00% murmurd
25892 root 1 44 0 9172K 2356K ttyin 0 0:00 0.00% bash
59999 xxxxx 1 44 0 9172K 2304K wait 0 0:00 0.00% bash
474 root 1 44 0 3200K 544K select 0 0:00 0.00% devd
44293 root 1 44 0 28768K 4136K select 1 0:00 0.00% sshd
59996 root 1 51 0 28768K 3712K sbwait 0 0:00 0.00% sshd
1144 mysql 1 76 0 7228K 1448K wait 0 0:00 0.00% sh
44295 root 1 46 0 9236K 2568K pause 0 0:00 0.00% csh
38476 postfix 1 44 0 6108K 1572K kqread 0 0:00 0.00% pickup
44299 root 1 44 0 8312K 2532K CPU0 0 0:00 0.00% top
25864 root 1 45 0 22976K 2108K select 0 0:00 0.00% sudo
46629 squid 1 76 0 6020K 1416K piperd 1 0:00 0.00% unlinkd
90325 www 27 67 0 41788K 6164K accept 1 0:00 0.00% httpd
322 root 1 76 0 7088K 1420K sbwait 1 0:00 0.00% pflogd
Link to comment
Share on other sites

@recifbox

Hmm... thought it was going to be smooth sailing, but I see you have squid. Are you using that for web related? Or is that just completely separate? And forgot to ask another important question before. Do you have multiple sites on that box? Or just 1 site? If you have vhosts, the config gets a bit.... longer (albeit going to copy/paste). lol

@AlexJ

Assuming that the subdomain is on the same box, it wouldn't make any difference except that the user now needs to query for 1 extra dns. So, it would actually be slower, although insignificantly.

Link to comment
Share on other sites

  • 5 weeks later...
  • 3 weeks later...

I bi this isn't the best time to post this as its old now, but i have wrote a Guide for Site Optimization a while back.

http://blacknovadesigns.co.uk/forums/topic/144-site-speed-optimization-how-to-do-it-yourself/

Just for anyone else that is wondering.

Was going to edit but to old to edit now but, Ignore that link, updated link now.

http://blacknovadesigns.co.uk/forums/tutorials/article/18-site-speed-optimization-how-to-do-it-yourself/

Thanks,

Link to comment
Share on other sites

@AlexJ

Assuming that the subdomain is on the same box, it wouldn't make any difference except that the user now needs to query for 1 extra dns. So, it would actually be slower, although insignificantly.

that's not true at all. running images off a subdomain will speed things up because browsers are limited to how many http requests they can make at once. (Depending on the browser) it's from 4-12 requests. By running a second domain you gain another 4-12 requests. This beats the extra DNS request by miles. :smile:

Link to comment
Share on other sites

that's not true at all. running images off a subdomain will speed things up because browsers are limited to how many http requests they can make at once. (Depending on the browser) it's from 4-12 requests. By running a second domain you gain another 4-12 requests. This beats the extra DNS request by miles. :smile:

yup very true

you can see this in action if you run your site through webpagetest.org and look at the waterfall chart ;)

Link to comment
Share on other sites

yup very true

you can see this in action if you run your site through webpagetest.org and look at the waterfall chart ;)

Yep and it's also visually faster if you have like a page with 100 gallery images on it lets say. Even just running 1 domain for the main website files, and 1 for the gallery it's much faster. Even better if you can run multiple subdomains. I have 1 site that uses a total of 4, and although it only has in total about 40 http requests on most pages. It's able to load all of these at once instead of waiting for others to finish. Although this would be limited to the users internet connection you might not notice much difference on say a mobile device, and really it's only 40 because I've condensed probably about 25 or 35 http requests for images into base64 so they are part of the page document. They are really small images so there is no point in wasting an http request.for these. As long as you do this carefully and not increase the document size too much it's a handy way to save http requests as well :)

Link to comment
Share on other sites

  • 6 months later...

ok on page speed test insight on chrome i get a 70/100 score so i have a lot of suggestion from this apps on chrome but most of them are from how things are "organized for my pov on the code of the site like inline small css or Optimize the order of styles and scripts etc... hard task to get the 100/100 :)

Link to comment
Share on other sites

@Eric Allione

If you feel that your site needs faster refreshing for pdf, go right ahead, or even remove it entirely. Side note. the code appears correct.

Nothing stops you from making longer timeouts, but you have to consider 2 factors.

1. Is the user ACTUALLY going to keep it for that long? If the user presses clear cache, (hard) refresh, private browsing, some anti-tracking tools, etc. then none of these settings matter. So, there's the question of how much of a difference is there between 2 days and 20 days or even 200 days? If you set it to like a year, you can pretty much guarantee the user isn't going to follow and going to be cleared sooner.

2. Expecting the unexpected. What if you changed an image on your site? It would be best if your user sees the new one asap. That's the primary trade off.

And... there's one more special place you actually need to consider. User avatars... (forgot about it while I wrote it before). When a user changes his/her avatar, do you want them to see it immediately at the cost of less caching? Then you'll want to omit these special images. Avatars, which usually go in "uploads" directory (or is it upload??? check and fix yourself).

Then we can change the match to something like this instead...

^((?!uploads/).)+.(jpg|jpeg|png|gif|swf|ico|css|js|pdf|flv)$

Which says, the word "uploads/" should not be in the match.

===========

@recifbox

I'll write something l8r... lol

Thanks, that really helped me !

Just to know though, how may I add other words than the word /uploads ?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
×
×
  • Create New...