How To Improve Drupal Performance On Your Localhost-winsockfix

In this post Im going to discuss about improving Drupal performance on your localhost – PAE, APC and MySQL tuning. My old laptop had broken down, and I had to quickly find a cheap substitute, which had a bit different configuration: two AMD cores VS four Intell i3 cores and 4GB vs 3GB. So, I decided to try Linux Mint, which is said to be better than Ubuntu. IMO for LAMP stack the name of the Linux distribution is not so important, because they are all working good, however you should decide which version to chose: 32 bit or 64 bit. I found out that 64 bit Linux is better for development, but it could be not good enough for some applications. Memory utilization for 32 bit Linux So, I decided to choose 32 bit version of Mint. The problem was that the first thing I noticed was that 2.6GB of RAM was only available. That seemed absurd and was definitely one of disadvantage of 32 bit system. When I was running full LAMP stack + IDE + Skype I saw almost all memory was used and some disk space was taken for swap. Luckily enough Physical Address Extension (PAE) was there to help, which could be installed with the following .mand: $ sudo apt-get install linux-generic-pae linux-headers-generic-pae This worked pretty well and system monitor showed 3.5 GB of RAM. Not 4 still, though it could be a unit conversion issue. However, I was happy that the system was working faster now. Configuring Alternative PHP Cache I had cloned a big project and saw how my machine was trying hard to handle requests, which slowed down the system. The way out was installing APC. Alternative PHP cache is open source and free framework that optimizes PHP intermediate code and caches data from PHP .piler in shared memory. In Mint or Ubuntu, it could be installed with the following .mand: $ sudo apt-get install php-apc I ensured that /etc/php5/conf.d/apc.ini file was in place and over-rode the default settings: Apc.shm size=128M Apc.max file size=10M I installed APC module that allows storing Drupal cache in memory instead of database. I ensured that the cache tables size was less than shm_size in config file. Then I enabled the APC module and added the following into settings.php file: $conf[cache_backends] = array(Sites/all/modules/apc/drupal apc; $conf[cache_backends] = DrupalAPCCache; $conf[page_cache_without_database] = TRUE; $conf[page_cache_invoke_hooks] = False; MySQL tuning Instead of enabling APC cache, database performance was not getting affected. So, I changed the settings of MtSQL to make it work faster. The following are the values with which I overrode MySQL config. Files: /etc/mysql/mysql.cnf: [mysqld] Key buffer = 128M Max allowed packet =128M Max connections =300 Table cache = 256 Query cache limit = 16M Query cache size = 128M /etc/mysql/conf.d/innodb.cnf: [mysqld] Innodb buffer pool size =1024M Innodb additional mem pool size =32M #innodb log file size = 16M Innodb log buffer size = 4M Innodb flush log at trx .mit = 2 Innodb thread concurrency = 4 Innodb flush method = O DIRECT Innodb file per table = 1 At last I ac.plished up to 100% increase in performance. I didnt try to change my HD to SSD as yet, but Im certain that itll gain even further performance. BTW is an interesting manual, use it to perform automated tests. It even allows running MySQL in memory instead of disk, this is really good. Valuebound is a leading Drupal Development .pany providing Enterprise Drupal web solutions. For more information on Drupal Development, contact us at Five Tips To Choose Web Application Development .pany By: Jennifer Maria – In todays time, when everyone is exploiting the web, you cannot afford to ignore the Internet. If you want to be in the race, you must harness the power of the web. And the first step to do so is to ha … Tags: The Perfect Gear For The Fitness Freak- Bluetooth Watch By: Neal David – For many people who are conscious about staying healthy and fit various fitness devices hold a lot of appeal. Managing your fitness regime very easy when you have such gears at your aid. One such … Tags: Prepare Yourself With It Support .pany Bristol For A Progressive Online Business By: Aaron – Some honest to goodness organizations offer you a guarantee period of the services they have offered. They have confidence in the nature of the work they convey. You can consider such offices after some g … Tags: Wireless Charger- Remove Geographical Constraints To Mobile Usage! By: Neal David – The literal meaning of the word "mobile" is to a certain extent lost due to the wired chargers which kind of limits the freedom of consumers to use their mobile handsets in a more optimal manner. Tags: Homeowner Associations By: smartweb – Homeowners Association(HOA) is an American corporation established by the real estate world for the purpose of marketing, managing, selling and buying ofproperties. Tags: Note 5 Screen Protector Is The Next Best Accessory For Your Smartphone By: Neal David – Note 5 screen protector from MXx has gained a lot of popularity, but, before you decide to buy one for yourself, why not examine its features closely? Yes, this screen protector has been found an advantag … Tags: Flaunt Your Phone With Ultimate Protection Offered By Mxx® Note 5 Clear Case By: Neal David – Smart phones are very essential part of our lives. It is not just a phone but a gadget with multiple utilities and to get the best of all worlds we love to spend as much as we can to get the best one. Tags: Software Is User Friendly And Easy To Use By: jaspreet sason – Software is very user-friendly. Software is not only used in .puters. These are used in so many devices such as in washing machine, robots, microwaves, satellites, mobiles, video games etc. Even a norma … Tags: Wireless Chargers "�" Make Your Mobile Handsets Truly Mobile! By: Neal David – Many enthusiast travelers and other mobile hand set users (almost the entire population, obviously) would have faced a situation sometime in their lives when they are out on a long journey or a drive with … Tags: Bluetooth Watch Bracelet "�" The Best Fitness Apparel In The Market By: Neal David – It is often claimed by experienced users that any metric which cannot be quantified cannot be tracked and monitored. This is one of the most relevant problems in fitness schedules and work outs where in t … Tags: 相关的主题文章: