Search squid archive

Re[2]: Frequent cache rebuilding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> For 6 days uptime:
>> # vmstat
>> procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
>>  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
>>  2  0     92 104052 235704 2309956   0    0     3    43   24   33 10 16 73  1  0
>>
>> As you can see system has spent only 1% of CPU time in I/O wait.
>> (cpu-wa column).
>>   

> This also shows the CPU has been 73% idle.  If I'm not mistaken, you 
> stated that you had a two CPU (core) system, which would still leave one
> of the cores at 50% idle.  Running "vmstat 2" while you are experiencing
> load will give more insight.

It's because at night time squid doesn't use so much CPU (around 10%
of 1 core).

Here is the output from "vmstat 2":
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 2  0     92 704676 274360 2354952    0    0     3    34    7   20 10 16 74  0  0
 1  0     92 703800 274364 2355312    0    0     0     0 1722  123 22 35 42  0  0
 1  0     92 703552 274392 2355476    0    0     2   378 1732  162 20 36 43  0  0
 1  0     92 703180 274396 2355912    0    0     0    45 1670  132 20 35 45  0  0
 2  0     92 702436 274412 2356408    0    0     6   482 1758  124 20 37 42  1  0
 1  0     92 701576 274432 2356792    0    0     4    20 1687  122 21 43 35  0  0
 1  0     92 701204 274440 2357016    0    0     4     8 1645  130 18 34 47  0  0
 1  0     92 700584 274452 2357160    0    0     2   474 1696  150 21 37 40  1  0
 1  0     92 700088 274484 2357460    0    0    16     8 1656  166 21 34 45  0  0
 1  0     92 699220 274516 2357508    0    0    10   388 1722  146 22 36 41  2  0
 1  0     92 698724 274532 2357660    0    0     8    26 1670  129 22 41 37  0  0
 1  0     92 698352 274536 2357992    0    0     2     0 1743  122 20 36 44  0  0
 2  0     92 697484 274556 2358036    0    0     4   304 1743  141 22 37 41  1  0
 1  0     92 696972 274592 2358480    0    0    16    30 1667  161 21 38 42  1  0
 2  0     92 696352 274628 2358732    0    0    14   420 1702  151 20 36 42  1  0
 3  0     92 695096 274640 2359052    0    0     4    26 1624  193 27 57 16  0  0
 1  0     92 695220 274660 2359200    0    0    10    40 1635  138 22 40 38  1  0
 1  0     92 694840 274688 2359464    0    0     8   432 1625  175 21 34 43  2  0
 1  0     92 694228 274700 2359788    0    0     4     2 1670  163 21 35 44  1  0
 1  0     92 693616 274708 2360052    0    0     2   454 1730  141 20 36 45  0  0
 1  0     92 692872 274736 2360232    0    0    14    26 1630  158 21 34 44  1  0
 1  0     92 692252 274748 2360408    0    0     6     2 1634  143 24 42 34  0  0
 1  0     92 691756 274764 2360680    0    0     2   388 1655  126 22 34 43  1  0
 1  0     92 691508 274768 2360684    0    0     0   232 1753  118 25 36 39  0  0
 1  0     92 691136 274772 2360804    0    0     0   254 1640  118 21 35 45  0  0
 1  0     92 690888 274776 2361028    0    0     0    26 1647  134 19 35 46  0  0
 1  0     92 690392 274780 2361248    0    0     2     0 1719  116 20 44 36  0  0
 1  0     92 689772 274784 2361300    0    0     0   320 1678  164 21 46 32  0  0
 1  0     92 689772 274792 2361452    0    0     2    60 1792  129 18 36 46  0  0
 1  0     92 689276 274812 2361632    0    0     4   272 1744  130 19 37 44  0  0
 3  0     92 688384 274820 2361788    0    0     0    14 1700  117 22 40 38  0  0
 1  0     92 688276 274824 2361952    0    0     0    46 1600  153 26 56 18  0  0
 1  0     92 688028 274832 2362144    0    0     0   238 1655  118 20 34 46  1  0
 1  0     92 687780 274844 2362256    0    0     2    70 1648  128 19 34 46  0  0
 1  0     92 687408 274860 2362372    0    0     4   212 1640  130 20 34 46  0  0
 1  0     92 687292 274864 2362508    0    0     2     0 1694  102 18 34 48  0  0

>> My cache dir directive looks like:
>> cache_dir ufs /var/spool/squid 16384 64 1024
>>   

> Make sure your Squid can support it (check the output of "squid -v" for
> aufs) and change this line to...

> cache_dir aufs /var/spool/squid 16384 64 1024

> ...to enable asynchronous cache accesses.

Did it. But the same thing (1 core load ~100%).

>> # vmstat -d
>> vmstat -d
>> disk- ------------reads------------ ------------writes----------- -----IO------
>>        total merged sectors      ms  total merged sectors      ms    cur    sec
>> ram0       0      0       0       0      0      0       0       0      0      0
>> ram1       0      0       0       0      0      0       0       0      0      0
>> ram2       0      0       0       0      0      0       0       0      0      0
>> ram3       0      0       0       0      0      0       0       0      0      0
>> ram4       0      0       0       0      0      0       0       0      0      0
>> ram5       0      0       0       0      0      0       0       0      0      0
>> ram6       0      0       0       0      0      0       0       0      0      0
>> ram7       0      0       0       0      0      0       0       0      0      0
>> ram8       0      0       0       0      0      0       0       0      0      0
>> ram9       0      0       0       0      0      0       0       0      0      0
>> ram10      0      0       0       0      0      0       0       0      0      0
>> ram11      0      0       0       0      0      0       0       0      0      0
>> ram12      0      0       0       0      0      0       0       0      0      0
>> ram13      0      0       0       0      0      0       0       0      0      0
>> ram14      0      0       0       0      0      0       0       0      0      0
>> ram15      0      0       0       0      0      0       0       0      0      0
>> sda    50114   8198 1197972  239114 771044 986524 13061742 1616345     0   1239
>> sdb      125   1430    2383     100      3     20     184      43      0      0
>> sdc   547181  13909 6116481 6209599 2893943 6771249 77505040 42580590  0   8027
>> dm-0    6659      0  143594   45401 528574      0 4228592 1248409      0    269
>> dm-1   13604      0  408122   82828 883993      0 7071944 3118925      0    677
>> dm-2     150      0    1132     387      2      0      10       2      0      0
>> dm-3   36240      0  639146  173982 178529      0 1428232  540632      0    229
>> dm-4     164      0    1136     610     35      0      76     155      0      0
>> dm-5     216      0    1240     817 166439      0  332884  262910      0    185
>> hda        0      0       0       0      0      0       0       0      0      0
>> fd0        0      0       0       0      0      0       0       0      0      0
>> md0        0      0       0       0      0      0       0       0      0      0
>>   

> Right.  Unless it's mounted as part of a logical volume, NFS doesn't 
> show up here.

Squid cache is on sdc disk. There is no other partitions on sdc except
squid cache.

Regards,
Nikita.


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux