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

Re: moving buffers/caching from RAM to SSD



On 1/1/2014 12:43 AM, Muhammad Yousuf Khan wrote:
> Thanks all, it was probably be my misunderstanding with  both technologies
> (RAM and SSDs). i have been told that SSDs are fast enough like RAMs and to
> show the performance that person refer his OS boot time which was
> dramatically minimized.

> i am also obsessed by the magic of ZFS. and ZFS people recommend using ZIL
> and logging on SSD. which apparently seems like the same process how linux
> cache things in RAM.

Caching is used at many levels in computer systems, both in hardware,
the OS kernel, and in software applications.  But the implementations
are quite different.  Conceptually, Linux page caching and ZFS caching
may be similar, but they are quite different in implementation,
execution, and function.

> however with your help and searching on google i learn that there is a hell
> lot of difference in speed of RAM an SSD.

Yes, a massive difference.

The DRAM bandwidth of a basic desktop system today w/dual channel
ddr3-1333 is ~20 GB/s.  The fastest SSDs are ~0.5 GB/s, or 40x slower.
The latency of modern DDR3 DRAM is ~50 ns (cache miss latency, not CAS
cycle time).  The latency of SSDs is ~100 μs, or 2000 times slower.

> Thanks all. i really appreciate your help.
> 
> 
> 
> 
> On Tue, Dec 31, 2013 at 10:33 PM, Stan Hoeppner <stan@hardwarefreak.com>wrote:
> 
>> On 12/31/2013 7:54 AM, Muhammad Yousuf Khan wrote:
>>> i dont know why i am saying is even practical or not.
>>>
>>> here is my free command
>>>
>>> @thor:# free -g
>>>              total       used       free     shared    buffers     cached
>>> Mem:            31         31          0          0          0         26
>>> -/+ buffers/cache:          3         27
>>> Swap:           93          0         93
>>>
>>>
>>> as you can see 27GB is being used in caching. i have few 160GB SSDs.
>>> can i move this buffers/caching load to my SSD. so that things could work
>>> more better.
>>
>> Muhammad,
>>
>> By design, the Linux kernel will use nearly all free memory for caching
>> disk blocks and filesystem metadata when the memory isn't needed by
>> other processes.
>>
>> When a process needs memory, the kernel simply drops some of the cached
>> pages, freeing them for immediate use.  This process takes a few tens of
>> nanoseconds per 4KB page--it is instantaneous.  It is because these
>> pages can be freed instantly that Linux eats up all the RAM for cache.
>> Cached file access is hundreds of times faster than disk access, even if
>> disk is SSD.
>>
>> What you are seeing is the expected Linux kernel behavior.  There is
>> nothing wrong here, nothing to fix.
>>
>> --
>> Stan
>>
>>
>> --
>> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
>> with a subject of "unsubscribe". Trouble? Contact
>> listmaster@lists.debian.org
>> Archive: http://lists.debian.org/52C2FFEB.7010604@hardwarefreak.com
>>
>>
> 


Reply to: