This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

HD for Cache proxy

Hi there.
I have about 550 home user, which use an extensive usage in web surfing.
In order to accelerate the speed I have tried enabling the HTTP Caching.
It seems to work fine for a while, but after a day it start slowing down.
I'm having Dell server with 4 GB ram (Astaro 7.402) , and I don't see any problem with the CPU or Ram usage.
After consulting a bit, someone told me that it might be Read/Wright speed of the hard disk, and it would be good idea to apply dedicate fast disk just for the HTTP Caching.
Has anyone ever try it?
Is it possible to configure Astaro to use a dedicate disk fore just for HTTP Caching?
[:S]


This thread was automatically locked due to age.
Parents
  • The 'iostat' command might help you determine if the disk is overloaded.

    A 10k or 15k RPM drive, or multiple drives in raid 0 or 10 would probably be best if it is a disk bottleneck.

    Reducing the logging for the http proxy might help as well.

    1 or 2 people here have hacked Astaro to mount a separate disk for logging, the same could be done for cache, but it would void your support.

    Barry
  • Hi Barry and thanks alot.

    I'm getting "bash: iostat: command not found"

    Any idea why?
  • oops... I guess it's missing from Astaro.

    try 
    vmstat -d 5
    or
    vmstat -d | head -2 ; vmstat -d 5 | grep hda
    if hda is your hard disk; sda for scsi

    that should have similar output. The '5' is 5 second updates.
    You'll have to look at the differences between the lines to figure out how many IO's you're getting in those 5 seconds, and whether you're saturating the disk or not.

    Looking at the harddrive light on the server could tell you a lot too.

    There's a really good book on Linux /UNIX performance, btw... "System Performance Tuning"
    System Performance Tuning | O'Reilly Media
    it talks a lot about using these tools.

    Barry
  • One more thing... if you're going to get a hardware RAID controller, it would be much faster if you get one with a battery-backed cache (BBC), otherwise Linux normally won't let the controller take care of caching writes.

    What size & speed hard drive are you using?
    What speed is the internet connection?
    How big is the proxy cache getting?
    Does flushing the cache restore the speed?

    You might want to talk to your Astaro reseller about this too.

    Barry
  • More stuff...
    'top' has an 'wait' column at the top... usually displayed as 'wa'... this is when there's stuff for the system to do but it's waiting for disk.

    I'm going to ask for IOStat at feature.astaro.com... feel free to vote it up.
    added as a comment to http://feature.astaro.com/pages/17359-astaro-gateway-feature-requests/suggestions/178908-better-system-reporting-hw-monitoring

    Barry
  • Hi Barry.

    What size & speed hard drive are you using? - 80GM SAS , 7200 (if I remember right)
    What speed is the Internet connection? - One 8/8 Leased + four 8/800k Adsl.
    How big is the proxy cache getting? - Last checked - close to 2GB
    Does flushing the cache restore the speed? - Yes

    See for me it seems normal.
    See if you can find anything unusual:
    [SIZE="1"][SIZE="1"]
    top - 14:23:34 up 27 days,  6:15,  2 users,  load average: 2.10, 1.82, 1.60
    Tasks: 141 total,   1 running, 138 sleeping,   0 stopped,   2 zombie
    Cpu(s):  5.0%us,  4.2%sy,  0.0%ni, 81.8%id,  5.8%wa (up to 13),  0.2%hi,  3.0%si,  0.0%st
    Mem:   3370324k total,  3018144k used,   352180k free,   146300k buffers
    Swap:  1052248k total,      232k used,  1052016k free,  1603264k cached

      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    29527 root      15  -1  120m 105m 1828 S   19  3.2 520:01.16 snort_inline
    19489 afcd      15  -1 18184  15m 1196 S   10  0.5   1011:55 afcd
    29243 chroot    16   0  244m 103m 2072 S    7  3.1 229:46.96 httpproxy  (up to 17)
     8718 root      17   0 44444  36m 4680 S    2  1.1 514:36.86 acc-agent.plx
    17492 root      15   0  8732 6012 2112 S    1  0.2   0:03.36 websec-reporter
     3848 root      15  -1  8208 6544  712 S    1  0.2 322:15.58 ulogd
    19146 root      15   0  3192 2072  628 S    1  0.1 157:25.10 syslog-ng
     4325 root      15   0 26196  22m 1712 S    0  0.7  89:54.23 named
    18551 root      16   0 14164 8860 2496 S    0  0.3  72:01.59 selfmonng.plx
    19156 postgres  16   0 49644  36m  35m S    0  1.1 111:13.65 postgres
        1 root      16   0   720  288  244 S    0  0.0   0:04.36 init
        2 root      RT   0     0    0    0 S    0  0.0   0:02.02 migration/0
        3 root      34  19     0    0    0 S    0  0.0   0:01.02 ksoftirqd/0
        4 root      RT   0     0    0    0 S    0  0.0   0:04.89 migration/1
        5 root      34  19     0    0    0 S    0  0.0   0:01.03 ksoftirqd/1
        6 root      RT   0     0    0    0 S    0  0.0   0:05.05 migration/2
        7 root      34  19     0    0    0 S    0  0.0   0:00.99 ksoftirqd/2
        8 root      RT   0     0    0    0 S    0  0.0   0:05.58 migration/3
        9 root      34  19     0    0    0 S    0  0.0   0:04.83 ksoftirqd/3
       10 root      10  -5     0    0    0 S    0  0.0   0:00.01 events/0
       11 root      10  -5     0    0    0 S    0  0.0   0:00.02 events/1
       12 root      10  -5     0    0    0 S    0  0.0   0:00.02 events/2
       13 root      10  -5     0    0    0 S    0  0.0   0:00.02 events/3

    home/login # vmstat -d | head -2 ; vmstat -d 5 | grep sda
    disk- ------------reads------------ ------------writes----------- -----IO------
           total merged sectors      ms  total merged sectors      ms    cur    sec
    sda   2286346 127728 140808317 27715456 119700168 704286328 2315675722 824230852      0 327626
    sda   2286346 127728 140808317 27715456 119700656 704287331 2315687650 824262508      0 327627
    sda   2286350 127728 140808349 27715480 119701136 704288192 2315698378 824296768      0 327628
    sda   2286351 127728 140808357 27715488 119701620 704290801 2315723130 824334188      0 327629
    sda   2286351 127728 140808357 27715488 119702316 704295032 2315762138 824407792      0 327631
    sda   2286352 127728 140808365 27715492 119702761 704295661 2315771138 824428344      0 327632
    sda   2286352 127728 140808365 27715492 119703261 704296315 2315780370 824463088      0 327633
    sda   2286352 127728 140808365 27715492 119703632 704296919 2315788170 824482056      0 327634
    sda   2286352 127728 140808365 27715492 119704221 704297680 2315798970 824534720      0 327635
    sda   2286352 127728 140808365 27715492 119704631 704298423 2315808194 824561240      0 327636[/SIZE][/SIZE]
  • A faster disk would most likely help a lot... I'd recommend a 15k one if the case can provide enough airflow to keep it cool.

    I'd still recommend talking to your Astaro reseller too, to make sure we're not missing anything else.

    Can you also post the output of 'free'; I'd like to see what your memory usage is with buffers subtracted.

    Barry
  • Hi Goldy.  The load average of your unit is unacceptably high.  These counters should be less than 1.  In my experience if the first counter is consistently over 1 then you will have poor performance.
Reply Children
  • Hi.

    I have nothing to compare to.

    Bare in mind that it's about 550 users and i have around 10,000 concurrent conections.

    average RAM -  16% and CPU - 35%

    Lan Bandwidth - up to 16 MBs

    The performance seems OK (download and Streaming are very fast).
    The only issue I can see is a slow surfing speed, specially the first access to new web site.
  • Goldy, do you have QoS set?  If not, I would suggest creating a bandwidth guarantee on the External interface for 'Internal (Network) -> HTTP -> Any' traffic.  I'd guess that guaranteeing 500kb would be adequate.

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Hi Goldy.  The load average of your unit is unacceptably high.  These counters should be less than 1.  In my experience if the first counter is consistently over 1 then you will have poor performance.


    Surely that depends on how many physical/logical CPUs there are in the box?

    Goldy, can you you show us the full output of "cat /proc/cpuinfo"?

    Regards,
    Stuart
  • Hi bob

    I'm having one 8/8 Mbps Leased line + four 8/0.8 Mbps ADSL lins.
    All working excellent through Uplink balancing + Multipath.
    All Http's balanced nicely between the 5 lines and there is no heavy load on any of them.
    I'm using QOS on the main (leased) line.


    Hi Stuart.
    As you can see - it's quite a monster... [:)]

    Surely that depends on how many physical/logical CPUs there are in the box?

    Goldy, can you you show us the full output of "cat /proc/cpuinfo"?

    Regards,
    Stuart


    processor       : 0
    vendor_id       : GenuineIntel
    cpu family      : 6
    model           : 15
    model name      : Intel(R) Xeon(R) CPU            5120  @ 1.86GHz
    stepping        : 6
    cpu MHz         : 1862.872
    cache size      : 4096 KB
    physical id     : 0
    siblings        : 2
    core id         : 0
    cpu cores       : 2
    fdiv_bug        : no
    hlt_bug         : no
    f00f_bug        : no
    coma_bug        : no
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 10
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
    bogomips        : 3732.81

    processor       : 1
    vendor_id       : GenuineIntel
    cpu family      : 6
    model           : 15
    model name      : Intel(R) Xeon(R) CPU            5120  @ 1.86GHz
    stepping        : 6
    cpu MHz         : 1862.872
    cache size      : 4096 KB
    physical id     : 0
    siblings        : 2
    core id         : 1
    cpu cores       : 2
    fdiv_bug        : no
    hlt_bug         : no
    f00f_bug        : no
    coma_bug        : no
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 10
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
    bogomips        : 3725.42

    processor       : 2
    vendor_id       : GenuineIntel
    cpu family      : 6
    model           : 15
    model name      : Intel(R) Xeon(R) CPU            5120  @ 1.86GHz
    stepping        : 6
    cpu MHz         : 1862.872
    cache size      : 4096 KB
    physical id     : 3
    siblings        : 2
    core id         : 0
    cpu cores       : 2
    fdiv_bug        : no
    hlt_bug         : no
    f00f_bug        : no
    coma_bug        : no
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 10
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
    bogomips        : 3725.55

    processor       : 3
    vendor_id       : GenuineIntel
    cpu family      : 6
    model           : 15
    model name      : Intel(R) Xeon(R) CPU            5120  @ 1.86GHz
    stepping        : 6
    cpu MHz         : 1862.872
    cache size      : 4096 KB
    physical id     : 3
    siblings        : 2
    core id         : 1
    cpu cores       : 2
    fdiv_bug        : no
    hlt_bug         : no
    f00f_bug        : no
    coma_bug        : no
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 10
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
    bogomips        : 3725.54
  • The only issue I can see is a slow surfing speed, specially the first access to new web site.

    Then, today, you said:
    All Http's balanced nicely between the 5 lines and there is no heavy load on any of them.

    How can one explain the difference?
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Well, it's very simple.

    According To Astaro, there is no heavy loads (CPU, Ram, HD) or heavy Usage on each one of the lines,  
    BUT from the users side it seems that after a day or so, of using HTTP Cache in Astaro,   Surfing thru web pages become slow.
    Clear Http page seems to bring back the speed to normal.

    That why this thread is about Http cache.[:)]
    It seems to me it something to do with the Cache,
  • Have you checked to be sure that your hard disk controller has lots of buffer and battery-backed-write-back-cache as Barry suggested?
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Hi.

    Dell SAS 5/IR controller.
    8-port 3Gb/s Serial Attached SCSI (SAS) controller.

    The SAS controler seems OK to me.
    Also like I said, there is no problem in any Other situation like downloading files, streaming and other protocols, which working pretty fast[:S].
  • As you can see - it's quite a monster... [:)]


    Well, I disagree with BangkokBob - with 4 logical CPUs, the load average is totally acceptable.

    We had a problem with similar symptoms here... manifested by the ASL downloading files over and over and saturating our bandwidth.  We fixed it by a combination of deleting the download_* files in /var/storage/chroot-http/tmp, clearing the cache and rebooting, multiple times - eventually the downloads went away.

    I used iftop to establish the Astaro was pulling a lot of traffic from Akamai, which was an eye-opener, because the Mb/s figures on the home page of webadmin were massively wrong.  The Astaro was showing very little traffic on webadmin, yet our Cisco ASA firewall on the outside of the Astaro was showing 45mbps of traffic - the moment the proxy was disabled the traffic went away, when it was enabled, it came back within seconds.

    I pored through the http logs but came to the conclusion that whatever it was, was not being logged or was not restarting at the request of a proxy client.

    Regards,
    Stuart
  • We're HP bigots, so know very little about Dell, but I expect the approach Dell uses would be simikar to HP and IBM.  In my experience, a RAID adapter with battery-backed-write-back-cache costs $100 to $300 more than one without.  The word "battery" doesn't appear in the documentation for your adapter, so I suspect that it's not what Barry suggested.

    CHeers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA