[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [TEKNIK] disc cache, ramdisk, mm.



> Den Thu, 14 Jun 2007 18:58:26 +0200 skrev Kristian Kallenberg:
>>> 1) Hvordan kan jeg (uden at reboote) slette forekomsten af filen i ram,
>>> således at anden gang performer ligeså dårligt som første (så jeg ikke
>>> skal reboote efter hver test)
>>
>> Det kan du ikke. ikke engang ved at afmontere og derefter montere en
>> partition.
>
> Umount må da frigøre RAM brugt til cache af det, der bliver afmonteret?

Jeg tror ikke umount håndterer maskinens ram, snarere kernen, men det
gjorde mig nysgerrig:

spock ~ # time dd if=/dev/hda of=/dev/null bs=8192 count=100000
100000+0 records in
100000+0 records out
819200000 bytes (819 MB) copied, 14,4089 s, 56,9 MB/s

real    0m14.413s
user    0m0.026s
sys     0m1.223s

spock ~ # time dd if=/dev/hda of=/dev/null bs=8192 count=100000
100000+0 records in
100000+0 records out
819200000 bytes (819 MB) copied, 14,394 s, 56,9 MB/s

real    0m14.398s
user    0m0.017s
sys     0m1.126s

Det ser ikke umiddelbart ud til at der bliver cache'et noget her! Jeg
havde ellers forventet at cachen blev brugt selvom man læste direkte fra
disken. Men hvad så hvis vi arbejder på filsystemet?

spock ~ # time dd if=/dev/hda of=somefile bs=8192 count=100000
100000+0 records in
100000+0 records out
819200000 bytes (819 MB) copied, 57,2387 s, 14,3 MB/s

real    0m57.290s
user    0m0.032s
sys     0m7.403s
spock ~ # time dd if=somefile of=/dev/null bs=8192 count=100000
100000+0 records in
100000+0 records out
819200000 bytes (819 MB) copied, 5,85853 s, 140 MB/s

real    0m5.862s
user    0m0.017s
sys     0m0.833s
spock ~ # time dd if=somefile of=/dev/null bs=8192 count=100000
100000+0 records in
100000+0 records out
819200000 bytes (819 MB) copied, 0,539936 s, 1,5 GB/s

real    0m0.544s
user    0m0.017s
sys     0m0.523s

Så ovenstående bekræfter dig i at vi cacher filsystemet, men ikke "den rå
disk".

> De afmonterede data kunne jo blive brugt og ændret af et andet OS mens
> device'et er afmonteret (hvis man fx har et fail-over cluster hvor flere
> knuder deles om et disk-device, men kun én knude har det monteret ad
> gangen).

Du har ret i ovenstående, men så snakker vi også om en opsætning hvor
cache og apparat ikke er i samme maskine.

> Bortset fra det, faldt jeg lige over dette:
> http://www.webpronews.com/expertarticles/2007/01/10/invalidating-the-
> linux-buffer-cache

Spændende artikel, den passer godt med de historier jeg har hørt tidligere.

/kallenberg



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2007-07-01, 02:02 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *