HI Gurus,

I would like to know why Drupal 7 need soooooo much disk resources. When I`m trying to open my website for a first time, Hard Disk running like a helllll... If somebody would like to open my website for the first time it took nearly 8 seconds. I would like to know how to optimize this ? Hard Disk led is RED all the time...

How to optimize Drupal 7 ? How to speed up Drupi ?

dlugasx

Comments

mcfilms’s picture

admin/config/development/performance and checking the caching options and setting the duration to high numbers will make the pages load faster for anonymous users. Agrrigating css and js will help. I often see many and large image files on these slow sites too. The next step is to cull any unused modules. The next step is to look at your hosting environment.

But yeah, Drupal is fairly resource hungry.

A list of some of the Drupal sites I have designed and/or developed can be viewed at motioncity.com

dlugasx’s picture

Maybe its possible to create some RAM disk for Drupal files ? I`m planning to do this.
My server is hanging when 10 users try to open for the first time my website... like I said, my head is red when hard disk is red ;)

What do You think about this ?

256Mb RAM Disk ---- /mnt/ramdisk/drupal for complete drupal directory tree without (files and temp folders) - only static drupal php and html files

Let him scratch in memory... hmm ? Is it possible to optimize drupal in this way ?

john_b’s picture

At some point Drupal is going to have to look in the database to read the data it requires. However, that data can be cached in RAM in various ways to cut down on disk IO (and for anonymous users, entire pages can be cached in Varnish).

Note also that decent servers such as those used for Linode's VPSs have 15,000 rmp hard disks, so if you are running on slow hard disk, the database reads and writes are likely to be that much slower.

As for putting files in RAM, this is not really the point (though Varnish can be set to use RAM for storage of pages, while Boost can be set to cache pages to file): after all the hard work your disk is doing is probably to a great extent reading and writing the database, rather than executing php.

Nevertheless you will benefit from using an opcode cache. I recommend you use APC (which also caches data as well as code).

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors

kristen pol’s picture

I set up my local Ubuntu MySQL to use RAM disk and it really sped up the write process (saving permissions page went from ~15 seconds to ~2 seconds). I used these instructions:

http://wolfgangziegler.net/ubuntu-11.04-simpletest-performance-upstart-m...

That being said, if your computer dies before it's written from RAM to disk (upon 'mysql stop') then you'll lose your data (well, any data since the last write). I'm thinking about writing a cron that will save the RAM info regularly so I don't have to stress about this.

Also, this is only for my development machine... not to be used in production.

-Kristen
Profile: https://www.linkedin.com/in/kristenpol
Drupal 7 Multilingual Sites: http://kristen.org/book