PFSense Adding Second Harddirve for /Cache directory

Discussion in 'PFsense M0n0wall IPcop & others PC based routers' started by Deeza, May 24, 2011.





  1. hanap ka nalang ng used wd raptors or wd blacks
     
    Darkanyons likes this.
  2. athenaxds

    athenaxds Member




    Virtual box pa rin naman yung setup so compatability would not be an issue
    Ok kaya kung 2nd hand na ssd para mura?
     
    Darkanyons likes this.
  3. Darkanyons

    Darkanyons Member




    Good idea! its a nice way to asses an SSDs' performance on caching. pls let us know how this set up performs when you deploy it.

    On a side note, i read somewhere that using SSD on squid can dramatically reduce the lifespan of the drive due to constant read/write cycles. we need to verify this if true. :)
     
  4. patchacker

    patchacker Member




    Sir pag nag Add lang ba ako ng HDD applicable tong code na ito o pwede kahit isang HDD lang ang gamit?
     
  5. Deeza

    Deeza staff Staff Member

  6. patchacker

    patchacker Member




    ah ok po. SATA naman yung HDD(single drive lang po ginamit ko kasi 1.5Tb naman yung HDD ko) ko. Nag improper shutdown kasi kanina yung box ko at ang tagal bumukas. Ginaya ko nalang yung code nyo para sa mga future improper shutdown. Salamat po
     



  7. Yeah I read that somewhere too that the READ portion works great but the WRITE portion I believe is where the deterioration would kick in. How fast will it reduce the lifespan is what I am wondering also. If it can run for two to three years I think it is acceptable on my end but so far I haven't read any documents that supports or disprove otherwise perhaps because SSD is only at its infancy and most haven't reached the degradation stage just yet. BUT...it will be nice if someone here can do one and share us some info
     
  8. jawslash

    jawslash Member




    mga master... pa check naman nitong sakin...
    tnx
     



  9. Code:
    Start Time:    Fri, 12 Oct 2012 08:51:43 GMT
    Current Time:    Tue, 23 Oct 2012 06:43:38 GMT
    Connection information for squid:
        Number of clients accessing cache:    20
        Number of HTTP requests received:    261898
        Number of ICP messages received:    0
        Number of ICP messages sent:    0
        Number of queued ICP replies:    0
        Request failure ratio:    0.00
        Average HTTP requests per minute since start:    16.7
        Average ICP messages per minute since start:    0.0
        Select loop called: 98110452 times, 9.609 ms avg
    Cache information for squid:
        Request Hit Ratios:    5min: 10.0%, 60min: 23.7%
        Byte Hit Ratios:    5min: 43.3%, 60min: 17.4%
        Request Memory Hit Ratios:    5min: 0.0%, 60min: 0.2%
        Request Disk Hit Ratios:    5min: 72.7%, 60min: 52.2%
        Storage Swap size:    2773232 KB
        Storage Mem size:    2132 KB
        Mean Object Size:    27.16 KB
        Requests given to unlinkd:    0
    Median Service Times (seconds)  5 min    60 min:
        HTTP Requests (All):  0.23230  0.32154
        Cache Misses:          0.25890  0.39928
        Cache Hits:            0.00767  0.01469
        Near Hits:            0.06640  0.17711
        Not-Modified Replies:  0.00000  0.00562
        DNS Lookups:          0.02562  0.02809
        ICP Queries:          0.00000  0.00000
    Resource usage for squid:
        UP Time:    942715.053 seconds
        CPU Time:    3495.023 seconds
        CPU Usage:    0.37%
        CPU Usage, 5 minute avg:    0.37%
        CPU Usage, 60 minute avg:    0.56%
        Process Data Segment Size via sbrk(): 0 KB
        Maximum Resident Size: 67668 KB
        Page faults with physical i/o: 6
    Memory accounted for:
        Total accounted:        11845 KB
        memPoolAlloc calls: 48904513
        memPoolFree calls: 48662579
    File descriptor usage for squid:
        Maximum number of file descriptors:  10548
        Largest file desc currently in use:    61
        Number of file desc currently in use:  43
        Files queued for open:                  0
        Available number of file descriptors: 10505
        Reserved number of file descriptors:  100
        Store Disk files open:                  0
        IO loop method:                    kqueue
    Internal Data Structures:
        102273 StoreEntries
          534 StoreEntries with MemObjects
          531 Hot Object Cache Items
        102104 on-disk objects
    Here is mine. pa assess naman po mga masters :D

    My setting cache management setting is:

    coos + aufs
    coss Hard disk cache size = 50
    Hardisk cache size = 15000 (My Hardisk is 20gb IDE)
    Object size = 4
    Memory cache size = 8
    Minimum object size = 0
    Maximum object size = 100
    Memory replacement policy = Heap GDSF
    Cache replacement policy = LFUDA
    Low-water-mark-in = 98%
    Low-water-mark-in = 99%

    My PFBox is Intel Pentium 4 3.0Ghz with 768RAM (Dedicated)
     
  10. athenaxds

    athenaxds Member




    Set that to 32
     



  11. Na set ko na po master athenaxds, ill post the update tomorrow. obserbahan ko po muna yung
    General Runtime Information

    Salamat po.
     



  12. Squid Object Cache: Version LUSCA r14850 patched: chudy r14

    Start Time: Tue, 30 Oct 2012 01:56:15 GMT
    Current Time: Tue, 30 Oct 2012 04:00:10 GMT

    Connection information for squid:
    Number of clients accessing cache: 11
    Number of HTTP requests received: 9775
    Number of ICP messages received: 0
    Number of ICP messages sent: 0
    Number of queued ICP replies: 0
    Request failure ratio: 0.00
    Average HTTP requests per minute since start: 78.9
    Average ICP messages per minute since start: 0.0
    Select loop called: 1143362 times, 6.503 ms avg
    Cache information for squid:
    Request Hit Ratios: 5min: 0.0%, 60min: 2.5%
    Byte Hit Ratios: 5min: 3.0%, 60min: 62.9%
    Request Memory Hit Ratios: 5min: 0.0%, 60min: 0.0%
    Request Disk Hit Ratios: 5min: 0.0%, 60min: 92.3%
    Storage Swap size: 292438 KB
    Storage Mem size: 172 KB
    Mean Object Size: 1700.22 KB
    Requests given to unlinkd: 0
    Median Service Times (seconds) 5 min 60 min:
    HTTP Requests (All): 0.25890 0.42149
    Cache Misses: 0.25890 0.44492
    Cache Hits: 0.00000 0.35832
    Near Hits: 0.00000 0.00000
    Not-Modified Replies: 0.00000 0.00865
    DNS Lookups: 0.00000 0.00000
    ICP Queries: 0.00000 0.00000
    Resource usage for squid:
    UP Time: 7435.378 seconds
    CPU Time: 89.089 seconds
    CPU Usage: 1.20%
    CPU Usage, 5 minute avg: 0.24%
    CPU Usage, 60 minute avg: 1.13%
    Process Data Segment Size via sbrk(): 0 KB
    Maximum Resident Size: 8760 KB
    Page faults with physical i/o: 5
    Memory accounted for:
    Total accounted: 2400 KB
    memPoolAlloc calls: 1786053
    memPoolFree calls: 1784140
    File descriptor usage for squid:
    Maximum number of file descriptors: 9856
    Largest file desc currently in use: 64
    Number of file desc currently in use: 33
    Files queued for open: 0
    Available number of file descriptors: 9823
    Reserved number of file descriptors: 100
    Store Disk files open: 0
    IO loop method: kqueue
    Internal Data Structures:
    215 StoreEntries
    43 StoreEntries with MemObjects
    42 Hot Object Cache Items
    172 on-disk objects


    Generated Tue, 30 Oct 2012 04:00:10 GMT, by cachemgr.cgi/LUSCA r14850 patched: chudy r14@pfSense.localdomain
     
  13. Darkanyons

    Darkanyons Member




    Your squid is working just fine.
     
  14. Darkanyons

    Darkanyons Member




    To optimize your hits, you may use this settings:
    Object size = 10
    Max memory object size =9
    Memory cache size = 128
     
  15. Darkanyons

    Darkanyons Member




    It looks good.

    But this build has just started.
    CPU Time: 89.089 seconds

    very few cached objects:
    Mem hit=0
    215 StoreEntries
    43 StoreEntries with MemObjects
    42 Hot Object Cache Items
    172 on-disk objects

    Its difficult to tell if this build is running well. please run it for a day to week, and take readings during those times.
     



  16. tnx..cge po,post ko after 1 week..
    btw i used your patch master dark and install squid and lucsa someone said to maximize cache daw..



    coss+aufs
    coss hardisk cache size = 20
    Hard disk cache size= 30000
    COSS Hard disk cache location = /var/squid
    Hard disk cache location = /var/squid/cache
    Object size = 4
    Memory cache size = 128
    Max memory object size = 8
    Minimum object size = 512
    Maximum object size = 100
    Memory replacement policy = Heap GDSP
    vCache replacement policy = Heap LFUDA
    Low-water-mark in % = 95
    High-water-mark in % = 98


    proc.sempron 1.8
    memory.750 mb
     



  17. Squid Object Cache: Version LUSCA r14850 patched: chudy r14
    Start Time: Wed, 31 Oct 2012 03:55:03 GMT
    Current Time: Wed, 31 Oct 2012 15:34:19 GMT

    Connection information for squid:
    Number of clients accessing cache: 14
    Number of HTTP requests received: 70420
    Number of ICP messages received: 0
    Number of ICP messages sent: 0
    Number of queued ICP replies: 0
    Request failure ratio: 0.00
    Average HTTP requests per minute since start: 100.7
    Average ICP messages per minute since start: 0.0
    Select loop called: 5629999 times, 7.452 ms avg
    Cache information for squid:
    Request Hit Ratios: 5min: 3.2%, 60min: 1.2%
    Byte Hit Ratios: 5min: 51.4%, 60min: 44.1%
    Request Memory Hit Ratios: 5min: 0.0%, 60min: 0.0%
    Request Disk Hit Ratios: 5min: 73.3%, 60min: 65.8%
    Storage Swap size: 313762 KB
    Storage Mem size: 440 KB
    Mean Object Size: 1762.71 KB
    Requests given to unlinkd: 0
    Median Service Times (seconds) 5 min 60 min:
    HTTP Requests (All): 0.13498 0.33943
    Cache Misses: 0.12783 0.35832
    Cache Hits: 0.24524 0.25890
    Near Hits: 0.00000 0.00000
    Not-Modified Replies: 0.00000 0.00000
    DNS Lookups: 0.00000 0.00000
    ICP Queries: 0.00000 0.00000
    Resource usage for squid:
    UP Time: 41955.807 seconds
    CPU Time: 568.948 seconds
    CPU Usage: 1.36%
    CPU Usage, 5 minute avg: 1.60%
    CPU Usage, 60 minute avg: 0.74%
    Process Data Segment Size via sbrk(): 0 KB
    Maximum Resident Size: 10432 KB
    Page faults with physical i/o: 4
    Memory accounted for:
    Total accounted: 2882 KB
    memPoolAlloc calls: 11069916
    memPoolFree calls: 11065598
    File descriptor usage for squid:
    Maximum number of file descriptors: 9856
    Largest file desc currently in use: 131
    Number of file desc currently in use: 84
    Files queued for open: 0
    Available number of file descriptors: 9772
    Reserved number of file descriptors: 100
    Store Disk files open: 1
    IO loop method: kqueue
    Internal Data Structures:
    280 StoreEntries
    102 StoreEntries with MemObjects
    97 Hot Object Cache Items
    178 on-disk objects
     
  18. Darkanyons

    Darkanyons Member




    You should not install squid and lusca. Lusca is a modified squid. just choose one.

    Your Minimum object size = 512 is wrong. just use 0 on this to cache small objects, this will increase your cache hits dramatically. Its the reason why you have poor stats.
    also modify this parameters as this may improve your hits:
    Object size = 10
    Max memory object size = 9
     



  19. tnx dito master try ko mamaya..
     
  20. obiwan0515

    obiwan0515 Member




    mga master

    nag-install na ako ng lusca, hindi pa naka-ready yun 2nd HDD para sa cache. pero ito ang lumabas na error. any inputs? tia

    [​IMG]
     
                                 

Share This Page