D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Hard Drives

 

There's a reason that advice is a bit windowsy, you dont tend to need massive performance on linux and as such the original asker of the question is probably on doze. Those of you who run servers which allocate resources to 200 or so thin clients might think differently but let's face it, if this person has the normal needs of web browsing and document creation they shouldn't have any issues with anything made after 1999.

On Wed, Dec 9, 2009 at 7:50 AM, Paul Hirst <paul.hirst@xxxxxxxxxx> wrote:
On Tue, 2009-12-08 at 17:23 +0000, Max Siegieda wrote:
> 1) Create a virtual RAM drive if you have enough memory, these can be
> used for steps 2 and 3...
> 2) Move your temporary cache into this space, means web pages can be
> loaded faster as you're not waiting for a random space on the HDD to
> become accessible
> 3) Move your page file into RAM - I know this sounds like a silly idea
> but for some reason a page file will always be used even if you only
> ever use 1% of your memory for program use, so move the page file and
> the only time things will go badly wrong is if you run out of space in
> RAM.

The above advice sounds Windowsy to me, but on a Linux system I would
give different advice.

Allocate enough swap space for your general swap needs and add on as
much as you would normally use for disk storage for /tmp and /var/tmp.
Then mount those two areas as tmpfs instead.

This means that temporary files generally don't have to touch the disk
at all. If, however, large files get written then the system will start
using swap space to store them.

If you are already using ext4 for /tmp then it's delayed allocation
feature should already give some of the same benefit so you might not
see such an improvement.

I did this on a web server runnning mod_perl (which was using ext3
for /tmp). Most page requests caused at least one temporary file in /tmp
and using tmpfs instead gave a significant performance boost.

Regarding turning off swap entirely, why would you want to do this? As I
understand it the kernel will swap things out because they are memory
pages that it really doesn't seem to need anymore and it thinks it would
be better off using the memory for other caching purposes.

Instead of turning the cache off you might want to play with
the /proc/sys/vm/swappiness setting if you really think the kernel is
making the wrong decisions for your system.


Sophos Plc, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom.
Company Reg No 2096520. VAT Reg No GB 348 3873 20.

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html