A note, often the OS's disk caching (esp with linux style cache) is
enough speedwise, it is worth going for memory only if you're 100%
sure that the disk is a bottleneck. Otherwise, by dedicating memory to
cache or tmpfs you can actually slow yourself down in a low mem
situation (by forcing apache or python to swap).

On Apr 7, 12:24 am, Kuba Kucharski <kuba.kuchar...@gmail.com> wrote:
> I thought about ramdisk, but tmpfs might be a better solution,
> practically it is the same. Main difference between tmpfs and linux
> ramdisk device is that tmpfs alocate memory dynamically and also
> less-used "pages" can be moved onto swap space.
>
> On modern linux distros it is as easy as:
>
> mount -t tmpfs tmpfs $folder_path -o rw,size=$size
>
> where:
> $folder_path is a path to the folder you wish to make "turbocharged"
>
> $size is the amount of memory you want to dedicate( M - megabytes )
>
> for example:
>
> mount -t tmpfs tmpfs /usr/local/web2py/applications/example/cache -o
> rw,size=200M
> mount -t tmpfs tmpfs /usr/local/web2py/applications/example/sessions
> -o rw,size=200M
>
> you can of course do something like that:
>
> mkdir  /usr/local/web2py/applications/example/databases/ramdisk/
> mount -t tmpfs tmpfs
> /usr/local/web2py/applications/example/databases/ramdisk/ -o
> rw,size=20M
>
> and then
>
> SQLDB('sqlite:///usr/local/web2py/applications/example/databases/ramdisk/ramstorage.db')
>
> --
> Kuba
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to