A clever trick to improve the speed of your firefox browser is by vacuuming its sqlite database. The VACUUM process rebuilds the database, thus defragmenting it, reduces the size and makes searching in it faster, using disk more efficiently may also reduce the load on your disk as it reads in sequence from my sectors. In general, this applies to any database that does not automatically perform vacuum / defrag on itself.

The process of defragmenting the Firefox database itself is quite trivial – we perform sqlite3 db-file VACUUM in the firefox profile directory. In linux, the path to it is usually ~ / .mozilla / firefox / random-name.default. In principle, you should only have 1 directory in .mozilla / firefox if you have more you can check ~ / .mozilla / firefox / profiles.ini for the correct directory in your browser's profile. Since I don't care about doing the process by hand, I wrote an elementary script to defragment the databases.:

for db in $(find ~/.mozilla/firefox/$(grep Path ~/.mozilla/firefox/profiles.ini | cut -d'=' -f2) -maxdepth 1 -name "*.sqlite" -type f)
do
   echo "VACUUM ${db}"
   sqlite3 ${db} VACUUM
   sqlite3 ${db} REINDEX
done

After executing the script, the search in the history and the loading of the fox itself is significantly faster. I guess the script can be used in Mac OS with small modifications.

p.s Here is the option for Mac OS X. – tested on Mac OS X Sierra. We have to force the delimiter to be a new line because of space in the path to the folder that contains the firefox profile

OIFS="$IFS"
IFS=$'\n'
for db in $(find ~/Library/Application\ Support/Firefox/$(grep Path ~/Library/Application\ Support/Firefox/profiles.ini | cut -d'=' -f2)  -maxdepth 1  -name "*.sqlite" -type f)
do
echo "VACUUM && REINDEX ${db}"
sqlite3 "${db}" VACUUM;
sqlite3 "${db}" REINDEX;
done

Before I start with the nonsense, I want to say, that I am not very advanced with web hosting and all I will write is the experience I have gained in recent times 2-3 months. I administer a fairly busy VPS in terms of traffic, according to tyxo is in the top 80 but enters the top 70 ;). That's my thought, that after so long I have acquired various habits and reached good practices in one way or another (usually more difficult) :D. I will not even write or go into the details of the configuration at all. Rather, I will share ideas to think about.

  1. Update the software regularly. Apache, php mysql all wants updates. Whether to patch holes in the security, whether due to fixed bugs or new features. Always keep your software up to date. In general, it is rare to drill a server through the applications, usually through holes in the code of the hosted things, but let's not rely only on this.
  2. Apache – it is not desirable for your web server to have more active modules than the ones you actually use. The more modules on- slow work.
  3. Multiple users on the same server – opcode cache. Some time ago I wrote Besides zerdion do satisfactory tests and see the real benefits of this magic. In my case I chose eAccelerator because in a real working environment it shows the best results with all the settings to it. Faster loading with less eating resources, which means more users.
  4. They push you with traffic – gzip. The easiest way to reduce the real traffic you make is with gzip compression of http responses to the client. Mod deflate is the apache solution. For other http servers I have not researched the issue :). Real around 50% I lost traffic when compressing on html,css,js,xml. I need to see if I can compress other types of content as well. Because real photos are the content that makes the most traffic in a site.
  5. mysql serer – I highly recommend it if you haven't been awarded a version 5.1 to do it. In general, Oracle has some small experience with databases 😆 and this experience has put it well into 5.1 version I have not tried 5.5 но и това планувам да стане скоро. Определено се ускори работата на sql заявките може би леко падна натоварването но с не повече от 5-6% but also the new functionalities for the programmers are wonderful. The basic one partitions. When upgrading, be careful what settings you have in my.cfg Not all old options are valid, it's also a good idea to remove old libraries at least with CentOS 5.5 made problems with Debian I did not have such annoyances. Then look at the mysql log because some of the options have different names and it is good to change them if you go to 5.5 don't wonder why your configuration doesn't work.
  6. sql заявките. Задължително разрешете опцията за записване на slow query. In these logs you can return information to the programmers if you are not for slow requests to be optimized. The fewer such requests the less load on your server 😉
  7. A little protection – change the default port of ssh you don't need crazy bots to try to hack you. Apache secure it with mod_security quite a useful module makes filtering on quite a bit – sql inj, rfi DDoS and others. It won't stop a lot of fuss, but at least the lamers will weed them out. PHP is a good idea to protect with Suhosin. It can be put as an additional extension or directly as a patch in the php code. I personally prefer the first one I think is cleaner.

For starters, these are the things I can think of. They are not many and when I think about it I have done a lot of optimizations on the server but many of them are quite specific according to the situation and there is no point in explaining them such as cache limits or how many processes the apache has been raised. Probably in time I will think of more things that are how to say some of the little things that give the big result.. The machine is quite well optimized for comparison we make 20k unique visits per day and we are on the lowest possible vps plan load time on the pages we do not exceed 1,5-2 sec or if it exceeds it is due to external sources of ads otherwise the page itself spits out for fractions of a second. People close to us have non-optimized servers with a lot more resources than ours and have the same results. In general, his mother is optimizing and her father is drinking beer

ps The song is slightly related to the theme 😀

because I am these days “a little” busy and I don't have time for serious blogs so I'll crack some stats from my block 😉 Overall I think somewhere around 6-7 I started it this month and so far the statistics are as follows

1. For operating systems

Windows XP 66.3%
Windows Vista 15.1%
Ubuntu Linux 14%
Debian Linux 1.7%
Windows Server 2003 1.3%
Linux 1.1%
Mac OS X 0.6%

Overall quite a pleasant surprise is that Ubuntu is a good percentage with quite a bit of worm trail 🙂 the rest is clear

2. Browsers

Firefox 3 52.5%
Firefox 2 10.1%
Opera 9.9%
Internet Explorer 6 8%
Internet Explorer 7 7.8%
Safari 5.6%
Internet Explorer 8 3.2%
Iceweasel 1.7%
Epiphany 1.1%
Netscape 0.2%

Here are a few surprises except that the fox splits the darkness 😉 First IE6 is ahead of IE7 strange because definitely the second is better supports everything that separated IE from a nice modern browser and generally hot advice that did not go to the 7th version to do it. The second thing is the presence of netscape, this May they stopped it this spring, if I'm not mistaken. Most likely some spider but who knows. Although the Netscape itself, when they stopped it directly, wanted a window to replace it with FF 🙂 Well, that was a little but oh my heart

As a self-respecting representative of the open source idea, I love open solutions 😉 In general, this guide is from things I have read from my observations, etc. 🙂

1. The most important thing is to install FasterFox (for FF3 click) the supplement, then open a new tab and write in it

about:config

and I will open to you the settings of the fox. There, find the key with the name network.dns.disableIPv6 and double-click its value to true This is from speed optimization. There is already a program for unidouss users that will be able to optimize the fox. FireTune gives you control over some annoying fox defects such as swallowing a lot of ram, the program is recommended for weaker computers. For Linux users ;) there is even a more readable solution Swiftfox is a project in which FireFox is optimized for different types of processors, his speed is amazing.

2. Goole- sometimes when you're looking for something it's nice to have help. The use of CustomizeGoogle gives you a lot of options when searching on Google- search help ( gives you hints), filters with which you can pass some sites from search, https link to Google sites.

3. The banners – boredom on the internet. Adblock Plus after its installation it will offer you a sheet with regular expressions for blocking banners and give it to EasyList USA (I think it was now that I don't mind pushing it with my filters) then 90% from the banets will disappear the rest you can easily block yourself. Always during the installation and domabyavm two expressions for blocking

*/baner / *

*/banner/*

With these two expressions you clear enough of its banners 100% everything from zamunda 😉
4. Download managers. I've always hated FlashGet and under Linux there is not a single readable manager except wget And to rely on the fox's down manager – pure madness. DownThemAll! download manager 500k ;)

5. Greasemonkey Allows you to include java scripts in some pages and improve their functionality.

http://userscripts.org/

there are quite a few ;)
6. compatibility with some of the old addons with FF3 :) open a new tab and type in the address bar about:config psoel with the right mouse button click and new->boolean for name put extensions.checkCompatibility and value you choose false
7,8…. I finished the most important things, others are now a personal choice FireFTP ftp client in the fox :) Gmail Notifier waiting for you Gmail for new chicks

Finally, my advice is to upgrade to FireFox3 is much faster 😉

ps I forgot to add maybe the most- my useful supplement 😉 Foxmarks This is an add-on that takes care of the synchronization of the bookmarks of different computers, operating systems and other things. 2 minutes and settlement does everything for you 😉 and you are everywhere with the same bookmarks

Who says, that IE is a fagot I will honestly and honestly tell him that he is wrong – he is not an ordinary fagot but a fat old fagot. For half a week now I've been struggling with debugging the problems we've been creating since Java Script and dumb IE. My first unpleasant surprise was when I wrote an elementary one CSS to make the site look like something while working on it. I push myself and at one point I decide to check what it will show me under Explorer и and surprise and it is not pleasant at the same time the rendering of CSS and HTML-a 😆 So he didn't count correctly (it and I had defined a little incorrectly) link tag <a href who in this situation worked smoothly in FireFox but IE didn't read it as a link and then added <a href=” ” so that Explorer can create a blank link for me 🙂 not that I need empty links I just don't have them, JS writes (Java Script) to show me tooltip windows, so I use the title attribute of the tag <and>. OK, this is somewhat my fault 😉 But the next one is much more striking So I liked icons links with different icons for different types of streams. В FF (FireFox) look wonderful transparent borders and a slightly yellow as you pass the mouse from above abe cute 😉 However IE are still Ibe- he put an ugly blue border on me and didn't replace it in anyone's position 🙁 Ebassi and the pedal! I solved a problem by thinking of a variable with content “border =”0” ” and so if it is IE browser the agent is put border zero otherwise it remains the default value. Far more interesting is that when I tested whether this problem will occur in another browser – eater. Pederaz is just IE. Opera and Netscape do great with my CSS 😉 The last idiocy was on Saturday, when I made the funk for popup windows. Everything is under FF again 6+ however, at some point it starts thundering in IE. I lost a lot of nerves and found all day, a string variable does not read it as such and instead reads “Radio PRJ” IE reads it as 2 variables ;). It's good that he was a friend of a very capable programmer who would remember that he had encountered a similar problem with decommissioning and its stupidity.. Again, after tests with other browsers, the result was Internet Explorer- the biggest fagot of all time 🙂 So if you're making headlines the WPP window doesn't allow it to be more than 1 word (many see him more) 😀 😎 And instead of a conclusion I will say, that in my future work I will always do optimizations for FF and IE maybe someday I will even disable it from the supported browser types.