Just like us people operating systems have age, they have stages of young, teenage, grow up and old 🙂
Finding out how old is Windows as Operating System is important task for Windows system administrator and Tech support and can help you decide whether the OS requires a fresh reinstall as Windows is known historically to start misbehaving with its aging and especially for Computer Technicians / Support that have Windows Support clients or for Computer Clubs support guys, it is a among the good practices to re-install Windows every few years (every 3 / 4 years for servers to 7 years for Win Servers) and for Desktop or Gamers PCs the lifecycle of OS often much less, a reinstall is required every 2, 2.5 years or so.
Of course Desktop PC Windows users are much more prone to the requirement for frequent reinstalls, because they tend to install a lot of shit cracked, software games and a lot of ugly stuff, that infests the PC and fills up registry with a lot of broken and useless content.
Finding out, the install date of Programs (Applications) in Windows
1. In registry: HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionUninstall
InstallDate YYYYMMDD (eg 20090301 for here March 1, 2009)
2. Through Control Panel -> Programs and Features
Determine the install date of Windows
1. In command line you have to issue:
systeminfo|find /i "original"
Note that this command will work on Windows Servers 2003, 2007, 2010 and Windows XP, 7, 8 but will show empty result on Windows 10
2. In cmd (command prompt):
WMIC OS GET installdate
Reult you will get will be like: 20131019011658
Deciphered this Windows install date is on: 2013(year) 10(month) 19(date) 01(hour) 16(minutes) 58(seconds)
3. Another way to get the OS install date via Windows Registers:
How to edit creation date, and date of file or folder edit in Windows?
Как да се редактира дата на създаване, дата на редактиране на файл или папка под Windows:
Well why would you want to change the creation date of Windows install or creation date of file or folder edit in Windows? Well just for the fun or because it can 🙂
Actually a lot of Windows white hats and mostly Script Kiddies (malicious crackers) do use this feature to falsify changed files in Windows lets say system files or any other Windows file, sometimes dumping the install date could be useful in computer data theft investigations or by crackers (please don't mix it with hackers, because term hacker is to be coined for a genius programmers and playful people).
It is possible to do a lot if not everything via Windows registry but perhaps the best way is to use a simple tool Attribute Changer, that is capable to change Windows file, folder and windows install creation date.
The spring and summer season in capital of Bulgaria Sofia gives unique possibilities for rest of the ordinary busy IT person like me because Sofia is situated in the ridge of Vitosha Mountain. Actually mountain tourism is really a great way to reduce pressure and clean up our heads of the overbusy daily office life consisting of non stop solving complex management, programming and other system administration tasks.
Besides being a great place for lovers of Nature Sofia and nearby places gives a lot of entertainment mountain huts (the popular Hijas, delta planers, ski lifting, horse riding, crystal clear air and mountain springs and perhaps the best a unique virgin nature situated just a 20 minutes with bus from the center of 1.5 million people. One common route in Sofia for residents and also for tourist who come for a visit to Sofia is actually Dragalevci (a Sofia village like Suburb) and the route leading to the ancient and famous monastery of Dragalevci which is in honour of The Holy Theotkos (Virgin Mary) Vitoshka.
From there there is ecological mountain footpath leading to a place called Bai Krystio who was a famous mountain tourist who helped a lot during 20 century for developing of mountain tourism in Bulgaria and Dragalevci and build a Hija (a mountain hut) which today is currently named in his honour.
For the lazy ones after 14:00 you can also go their with a car there is an asphaltous way leading to the Mountain Hut, even though it is much preferrable to go their walking the steep wild road going through the wood surrounded by beautiful springing waters. A walk in Dragalevci to the Hut could be successfully made for less than 2 hours with a small 5 minutes breaks the pathway leading to it is long and as a lot of tourists go their regularly there is no chance for you to lost yourself. From Dragalevci there are a lift-station chairs called "Goli Vryh" translationg as "Naked peak". Right the Dragalevci station their is a "plazza" which leads to the very famous near Sofia rest place called "Hija Aleko / Hut Aleko".
Walking through the wood once reaching the asphals, there is a sign showing the way to Aleko hut (which is named after the famous Bulgarian author and publicist Aleko Konstantinov).Our trip started from Paradise Mall and to reach their we catched a bus number 93 the bus ticket is just like an ordinary city ticket and costs only 1 leva, the bus we travelled with was a bit archaic some old medel Mercedes but in my opinion there is also a charm in these too.
Going to Dragalevski monastery has 2 ways either the asphalt one or the wood footpath so we me (Billiana, Ilia and Svetlana) choose the footpath from which you see and hear the relaxing voice of Dragalevska river which is parallel the walk path.
Dragalevtzi view to the nuns cells and cemetery
Dragalevski Nun Monastery is a very peaceful and beatiful place behind the beautiful church is the cemetery where about 7 nuns are peacefully laying waiting for the resurrection of the Dead that is to come in the Judgment day when the Lord Jesus Christ commands all the dead to Resurrect for judgement.
Dragalevci Eastern Orthodox Church Holy Alters (actually belonging to 2 Churches the old and the new one)
Dragalevtzi Monastery BellsGoing through a stone stairs you reach a spring water (Holy Spring / Aiazmo) and a monastery wood pavillion where you can sit to have a picnic or have a peaceful rest looking through the beautiful garden downway.
Holy Spring in Dragalevtci Monastery Virgin Mary (Vitoshka) Nuns livings cells
If you continue uplifting the mountain footpath after about 30 – 40 minutes you reach the mountain-lifts in the region of Bai Krystio and you see a lot of people lifting down the mountain, a great way to travel back if you're too tired from the walk.
In the Bai Krystio hut you'll find a kind of mixture of a mountain restaurant and caffeteria where you can have a great lunch / dinner of meatballs with french fries / kachamak / bob a cabbage salat with carrots, shopska salata with beer or hot tea. We had the chance to have a quick interaction with the selling old granny and the helper kitchen lady which was too kind calling everyone my child and having the mothers like behaviour.The hygene and the overall atmosphere of the Hija was okay though don't expect a 5 stars restaurant.Also it is notable that everyone we saw on the wood path leading to the Hija was greeting us so the atmosphere was much warmer than the cold and lonely cities we live in nowdays.If you continue from Bai krystio you can reach the marked pathway leading to Goli Vryh and from their you will reach to Aleko Hut, Cherni Vryh (Black Peak) or Momina Skala (The Maiden Rock).
We enjoyed a lot and I'm thankful to God for the great day we had today, if you happen to live in Sofia and looking for enjoyment for the weekend or you are on a holiday i recommend you go Dragelvtzi you'll not regret it.
If you're into IT industry even if you don't like installing frequently Windows or you're completely Linux / BSD user, you will certainly have a lot of friends which will want help from you to re-install or fix their Windows 7 / 8 / 10 OS. At least this is the case with me every year, I'm kinda of obliged to install fresh windowses on new bought friends or relatives notebooks / desktop PCs.
Of course according to for whom the new Windows OS installed the preferrences of necessery software varies, however more or less there is sort of standard list of Windows Software which is used daily by most of Avarage Computer user, such as:
– (WinDirStat or SpaceSniffer – Tools that can show you which is the biggest files and directory inside a directory tree) – WinGrep (Grep: Grep for Windows) – Everest Home Edition ( Hardware System Information – Shows you what is the PC hardware )
I tend to install on New Windows installs and thus I have more or less systematized the process.
I try to usually stick to free software where possible for each of the above categories as a Free Software enthusiast and luckily nowadays there is a lot of non-priprietary or at least free as in beer software available out there.
For Windows sysadmins or College and other public institutions networks including multiple of Windows Computers which are not inside a domain and also for people in computer repair shops where daily dozens of windows pre-installs or a set of software Automatic updates are necessery make sure to take a look atNinite
As official website introduces Ninite:
Ninite – Install and Update All Your Programs at Once
Of course as Ninite is used by organizations as NASA, Harvard Medical School etc. it is likely the tool might reports your installed list of Windows software and various other Win PC statistical data to Ninite developers and most likely NSA, but this probably doesn't much matter as this is probably by the moment you choose to have installed a Windows OS on your PC.
For Windows System Administrators managing small and middle sized network PCs that are not inside a Domain Controller, Ninite could definitely save hours and at cases even days of boring install and maintainance work. HP Enterprise or HP Inc.Employees or ex-employees would definitely love Ninite, because what Ninite does is pretty much like the well known HP Internal Tool PC COE.
Ninite could also prepare an installer containing multiple applications based on the choice on Ninite's website, so that's also a great thing especially if you need to deploy a different type of Users PCs (Scientific / Gamers / Working etc.)
Perhaps there are also other useful things to install on a new fresh Windows installations, if you're using something I'm missing let me know in comments.
It is my great joy to share with my dear readers, that Archibishop Saint Seraphim Sobolev (1881-1950), Archibishop of Bogochar has been canonized officially by the Russian Orthodox Church on yesterday 3rd of 2016 in their plenary meeting held at Christ the Savior Cathedral in Moscow.
Saint Seraphim Sobolev, has long time has been considered a saint by many Bulgarians and Russians in Bulgaria, for his countless spiritual intercessions for those who venerate him and ask for his prayer and spiritual guidance. St. Seraphim Sobolev crypt in the Russian Orthodox Chruch in Sofia Bulgaria in honor of Saint Nicolas.
Even my joy is greater his Eminence Metropolitan Ioan (John) of Varna and Veliki Preslav, who happens also the Bishop of my birth place Dobrich, Bulgaria was present On the official canonization. Also it is not a coincidence that our Metropolitan Ioan was present at the canonization, since he happens to be a spiritual child of a direct disciple of st. Seraphim Sobolev.
Some other notable bishop presents at the canonization Church service was, His Grace Bishop Arseny of Znepolsk, Vicar of the Plovdiv Metropoliate, and Archimandrite Feoktist (Dimitrov), representative of the Bulgarian Patriarch to the Patriarch of Moscow and All Russia. The overall count of Bishops, Archibishops and Metropolitans who took participation in the canonization was approximately 320, almost all the bishops of Russian Orthodox Church (Moscow Patriarchate).
The news that holy Seraphim Sobolev is considered for canonization has been sweeping the Bulgarian Church space for a long time. A nice priest lady has made even a notable movie, about the saint pointing the general turning points of his difficult life, last year and the movie was presented in the Russian Cultural Center in Sofia Bulgaria, below is the movie (unfortunately in Bulgaria and Russian), hopefully soon someone to translate it also to English:
full of a lot of sorrow and uncertainties, because of the harsh Soviet time in which the saint was serving the Church. In order to caninize a saint, the process is quite long and usually in Russian Church it takes pretty longer sometimes from 20 to 50 years, however with St. Seraphim Soboev, already 66 years already passed since his peaceful passing to Christ on 26th February 1950. The head of the local Russian Church council was his Eminence Patriarch Kiril Bishop of Moscow and all Russia.
The members of the Council unanimously voted for the glorification of Archbishop Seraphim, who has been venerated for many years in Bulgaria and Russia. Metropolitan Ilarion then read the Act of the Holy Council of Bishops announcing the canonization of Archbishop Seraphim among the host of saints. The Council members then sang the exaltation to the newly-glorified saint. His Holiness Patriarch Kirill then gave Metropolitan Ioann an icon of St Seraphim painted at St Petersburg Theological Academy as a gift to the Bulgarian Orthodox Church.
The full canonization title given to st. Seraphim Sobolev (archibishop Bogocharski) from Sofia (The Wonder worker).
So who is Archibishop Seraphim Sobolev?
St. Nicolas Borisovich Sobolev is born on 1st of December 1881 in Russia, province of Rezan in the Russian Empire. After completion of seminary in 1904, he entered Saint Peterburg spiritual academy, which he completed in 1908 y. with the honour of candidate of Theological studies. At that time he has been ordained for hieromonk. After a short pastoral service in a school in Jitomir, in 1909 fr. Seraphim become a helpng overseer in Kalujsk spiritual school in 1911 and was inspector in the seminary of Kostroma, in 1912 he become a rector of the spiritual seminary in Voronej.
While in Vironej he had experience the terrors of Red (Soviet) Revolution. In autumn of 1919 archimandrite Seraphim went to Ekaterinodar and from then transferred to Crimea. There in 14.10.1920, he was ordained in bishop Lubenski. The ordaining was God's plan for him and also happened perhaps, because of the need of bihops, because of mass inprisonment of bishops and archibishops by the red beasts of the communist party.
With the blessing of his spiritual elder bishop Seraphim has left Russia. From this day on his life is a life of an emigrant. For a while he has taught Theology in the spiritual school of Constantionople's patriarchy on the Island of Chalkidiki. In 1921 he was assigned as a bishop of the Christian temple in the Russian Church in honour of Saint Nicolas the Wonderworker in Sofia which was made as a monument of The Bulgarian Liberation – the Russian-Turkish Liebaration war. Same year with a decree of patriarch Tikhon, who now is also canonized – st. Patriarch Tikhon of Moscow and all Russia he was assigned to govern the Russian parishes in Bulgaria with the archibishop title Bogucharski. Until 1944, bishop Seraphim who in 1934, became archibishop was under the jurisdiction of Russian Orthodox Church outside Russia (ROCOR) from 1934. In 1945 he has joined back to the Russian Orthodox Church of Moscow Patriarchy. In 1948 archibishop Seraphim took participation in the All-Orthodox gathering in Moscow. St. Seraphim Sobolev was a fervent fighter for holy and true orthodoxy and a great enemy of the movement of Ecumenism movement (a movement aiming to unite all Orthodox and then all Churches under the government of a protestant like body called World Council of Churches). All his life just like Jesus Christ, st. Seraphim Sobolev has lived without possessing on own house. He paid for his one room apartment from his small money priest sallary which at that time was hardly enough to pay his rent and for some food. He lived all his life renting an apartment with his own money, (something which was absolutely unthinkable), for a bishop of all Russian eparchies of Bulgaria at that times. Even during lifetime, he helped and turned a lot of people from the sinful ways leading to death, had a lot of spiritual children after him, he established a small nun monastery Kniajevo nearby Sofia. He also was one a fervent fighter against the cult of Dynovism (Danovism), started by anti-christian posing christian, Peter Dynov. St. Seraphim Sobolev was a fervent defender of Orthodoxy, freely showing up the delusions of Roman-Catholicism, Protestantism, Pentecostals, Baptism, Adventism and was strongly against the popular at that time united prayers between Orthodox and non-orthodox christian teachings. He is also an author of Theological literature who in details makes a comparison between Anglican Protestant Christianity and the Eastern Orthodoxy.
St Seraphim, denounced on a multiple occasions, the movement of ecumenism as being anti-christian and not in the spirit of the one Holy Eastern Orthodox Church, thus all his life and all his spiritual children were strongly trying to hold the Church teachings, was supporters of the celebration of Church feasts under the Julian calender, and was against the untroduction of the Gregorian Calendar – so called new Style calender in the Eastern Orthodox Churches.
It has to be said that it is a bit of paradox that the canonization of st. Seraphim Sobolev was made by the Russian Church, as the Russian Orthodox Church, along with Romanian and Serbian and many other Orthodox Churches continues to be an active member in the Ecumenical Movement. Because of St. Seraphim Sobolev even to these days, there are a lot of Christians who continue to follow the old Julian Calendar feasts style, the so cold Old Calendarists.
The most notable work of st. Seraphim Sobolev in my humble opinion is the creation of Acathist of the Greatest Bulgarian Saint, Saint John of Rila.
Perhaps as a fervent fighter to keep the true teaching of the Holy Orthodox Church and his incessant labor for the true Church of the Lord Jesus Christ, God give him a blessed departure from earthly life to the saviour of mankind the Lord Jesus Christ on the Church feast day of Sunday of the Triumph of Orthodoxy.
For the 66 years since his passing to Christ, each day on the grave of st. Seraphim Sobolev has been served a special service for co-memoration of the deceased and for forgiveness of his sins called in orthodox terminology Panihida, and the remembemrance of all the brothers and sisters in Christ who has departed from life.
The grave of Saint Seraphim Sobolev is situated in a small chapel (crypt) located in the center of Sofia, Bulgaria, Russian Orthodox Church, St. Nicolas. Even to this day people go daily on a big queues to ask the saint for help in hardships in life. The accepted way that people turn for prayer intercession is by writting their beseeches, needs, problems on a piece of paper and then dropping the small letter in a box called (Iashtik) Russian. I myself have been there and prayed and a lot of the things, I've asked the saint for my personal life and well being already come true. I know also of other people who by the prayers of the saint has been saved from a impossible to escape situations and a lot of people received spiritual confort and peace as well as spiritual healing when turning to the saint. Saint Seraphim Sobolev, pray the Lord Jesus Christ for us the sinful Bulgarians and all the suffering people around the world, for the refugees, for the sick for the hungry for the homeless and for all nations that we turn to repentance and come back to the way of salvation you Lord Jesus has shown to the nations.
If you’re a sysadmin which needs to deal with Microsoft Windows servers locally or remotely via Remote Desktop RDP client (MSTSC.EXE) or inside a Windows Domain Controller, you will have to frequently debug Windows isseus or Application caused errors by reviewing debug information stored in Event Logs.
Event Viewer is a precious tool to debug often errors with missing libraries or failing programs on Windows boot and thus on M$ Windows it is the Swiss Army knife of sysadmin. However as staring Event Viewer using the GUI menus, takes a lot of step and looses you time, e.g., you have to navigate to menus:
1. Start button Picture of the Start button 2. clicking Control Panel 3. clicking System and Security 4. clicking Administrative Tools 5.then double-clicking Event Viewer. 6. Granting Administrator permission required If you’re prompted for an administrator password or confirmation
It is much handier to just start it with a shortcut:
Press Windows (Button) + R – To invoke run prompt
In case if you’re running eventvwr.msc to connect to remote Windows Server run from command prompt (cmd.exe):
If you used to be a long years Linux / UNIX sysadmin and you suddenly have to also admistrate a bunch of Windows hosts via RDP (Remote Desktop Protocol) / Teamviewer etc. and you need to document The Load Avarage of a Windows XP / 7 / 8 servers but you're puzzled how to get an overall load avarage of Windows host via command in a UNIX way like with the good olduptime Linux / BSD command e.g.
ruth:$ uptime 11:43 up 713 days 22:44, 1 user, load average: 0.22, 0.17, 0.15
Then its time to you to get used to WMIC – WMIC extends WMI for operation from several command-line interfaces and through batch scripts. wmic is a wonderful command for Command addicted Linux guys and gives a lot of opportunities to query and conduct various sysadmin tasks from Windows command prompt.
To get an loadavarage with wmic use:
C:\>wmic cpu get loadpercentage LoadPercentage 1
@for /f "skip=1" %p in ('wmic cpu get loadpercentage') do @echo %p% 1% %
on Windows 7 / 8 and 10 as well Windows Server 2010 and Windows Server 2012 for more precise CPU loadavarage results, you can also use:
If you happen to have SSH account on a Dedicated server or a VPS that runs on some kind of UNIX like OS such as Linux / *BSD or just a friends Mac OS notebook and you don't want your HTTP traffic to be sniffed (spyed) by your local ISP, e.g. you want to get some kind of simple Web browsing anonimity on the Internet, easier alternative to using SSH Dynamic Tunnel to Proxify encrypted traffic is to just run a Proxy Cache server on remote *nix host to which you have access and configure your browser to use the host as proxy. Besides enhanced traffic privacy other advantage of running a Proxy server is of course the fact that using proxy server cache significantly improve page speed opening times, optimize web-sites content delivery saving you a lot of bandwidth and off-loads remote sites because already cached content at the proxy is served directly from the proxy server instead of each time requested from the server. Those admins who remember "the dawn of mass internet use" should remember that a lot of the small and middle sized internet providers were into the habit to use Squid transparent proxy with huge Disk Cache in order to speed-up their customers internet page opening times and thus offer a superior service and save money for themselves since the ISPs were also paying not for a bandwidth to end providers but for used overall Traffic.
Historically I've personally used TinyProxy a lot to "obfuscate" my traffic (hide my originating host IP) and to save-bandwidth cause in late 1990's I paid my internet bills based on used traffic and starting a TinyProxy saved me network traffic and hence cut my Internet bill but even today it is great to optimize web traffic.
Below is TinyProxy package description from Debian
apt-cache show tinyproxy|grep -i desc -A 5 Description: A lightweight, non-caching, optionally anonymizing http proxy An anonymizing http proxy which is very light on system resources, ideal for smaller networks and similar situations where other proxies (such as Squid) may be overkill and/or a security risk. Tinyproxy can also be configured to anonymize http requests (allowing for exceptions on a per-header basis).
You might want to change some of below default values:
# User and Group with which TinyProxy will be running User nobody Group nogroup # Default proxy listen port Port 8888 # Specifies IP (interface) to be used for outgoing proxy host connections Bind 192.168.0.1 # To which IP address (interface) tinyproxy will listen for connections. If uncommented it will listen to all available network interfaces Listen 192.168.0.1 # Seconds after which connection will be terminated Timeout 600 # Where proxy queries will be logged (very useful to keep a history for yourself on pages you have visted), sometimes useful if you wipe out browser cache Logfile "/var/log/tinyproxy/tinyproxy.log" # How many clients (connections) can be made to tinyproxy for one client (personal use) 100 is a good value MaxClients 100 # This two values are settings on how many (minumum and maximum) tinyproxy instances will listen for connection from remote hosts – this should be familiar to people who configured Apache webserver, note that tinyproxy uses process fork and not threads MinSpareServers 5 MaxSpareServers 20 # This is how many sites connections the proxy will listen to # if you open 20 sites in 20 tabs which will refresh make here 20 # you might need to raise this if you have 10 clients StartServers 10 # hosts to allow connection to proxy server from (Be careful to allow only access from your network otherwise you might end up being an open proxy), allowing some hax0r to do something terrible proxying through you Allow 127.0.0.1 #The Log Level – "Error" is generally Okay, who may like more information can take Notice – Connect and Info LogLevel Error # pidfile location PidFile "/var/run/tinyproxy/tinyproxy.pid" # The "Via" header is required by the HTTP RFC, but using the real host name # is a security concern. If the following directive is enabled, the string # supplied will be used as the host name in the Via header; otherwise, the # server's host name will be used. # ViaProxyName "tinyproxy
To install TinyProxy on FreeBSD
freebsd# cd /usr/ports/www/tinyproxy freebsd# make install distclean
If you need to change the default TinyProxy port from port 8888 to something else for security reasons edit:
Find port and change is to lets say 7000 or whatever network port is good for you
If you're concerned about transferred data security between your client host (Desktop) machine and remote installed Proxy server that your ISP or some malicious guy could sniff your website login credentials using Man in the Middle attack, its also a good idea to use TinyProxy together with SSH Tunnel, that's pretty easy if you have an SSH client on your machine (if you're on a Mac OS X).
As a person involved in IT, i've been always irritated by how much inproductive is our society. Almost nothing in a modern world (no matter the Government Regime be it democratic or communistic is pushing you to become productive) on the contrary the modern culture preached habits are putting you into habits which are both unhealthy and make you live a very boring and unsuccessfuly life. There are plenty of books already written on the subject on how to be productice, however people are so busy to produce more and more and be materially successful, that most of the people we do is unwise and lacks any efficiency. Below Infogram definitely gives a clue what is wrong with most people's regime which tend to produce less and less day by day, even though they put more and more effort in what they do.
Though I always thought I'm among the productice population, after revealing the inforgram I understand a lot of my mistakes which causing me to have often unhealthy and unefficient life …
Something very useful that most Apache LAMP (Linux Apache MySQL PHP) admins should know ishow to check Apache Webserver uptime and MySQL server running (uptime). Checking Apache / MySQL uptime is primary useful for scripting purposes – creating auto Apache / MySQL service restart scripts, or just as a quick console way to check what is the status and uptime of Webserver / SQL.
My experience as a sysadmin shows that lack of Periodic Apache and MySQL restart every week or every month often creates sys-admin a lot of a headaches cause (Apache / NGINX / SQL server) starts eating too much memory or under some circumstances leads to service or system crashes. Periodic system main services restart is especially helpful in case if Website's backend programming code is writetn in a bad and buggy uneffient way by unprofessional (novice) programmers. While I was still working as Senior SysAdmin in Design.BG, I've encountered many such Crappy Web applications developed by dozen of different programmers (because company's programmers changed too frequently and many of the hired Web Developers ,were still learning to program, I guess same is true also for other Start-UP Web / IT Company where crappy programming code is developed you will certainly need to keep an eye on Apache / MYSQL uptime. If that's the case below 2 quick one liners with PS command will help you keep an eye on Apache / MYSQL uptime
As a WordPress blog owner and an sys admin that has to deal with servers running a lot of WordPress / Joomla / Droopal and other custom CMS installed on servers, performoing slow or big enough to put a significant load on servers and I love efficiency and hardware cost saving is essential for my daily job, I'm constantly trying to find new ways to optimize Customer Website (WordPress) and rest of sites in order to utilize better our servers and improve our clients sites speed (and hence satisfaction).
There is plenty of little things to do on servers but probably among the most crucial ones which we use nowadays that save us a lot of money is tmpfs, and earlier (ramfs) – previously known as shmfs). TMPFS is a (Temporary File Storage Facility) Linux kernel technology based on ramfs (used by Linux kernel initrd / initramfs on boot time in order to load and store the Linux kernel in memory, before system hard disk partition file systems are mounted) which is heavily used by virtually all modern popular Linux distributions.
Using ramfs (cramfs variation – Compressed ROM filesystem) has been used to store different system environment kernel and Desktop components of many Linux environment / applications and used by a lot of the Linux BootCD such as the most famous (Klaus Knopper's) KNOPPIX LiveCD and Trinity Rescue Kit Linux (TRK uses /dev/shm which btw can be seen on most modern Linux distros and is actually just another mounted tmpfs). If you haven't tried Live Linux yet try it out as me and a lot of sysadmins out there use some kind of LiveLinux at least few times on yearly basis to Recover Unbootable Linux servers after some applied remote Updates as well as for Rescuing (Save) Data from Linux server failing to properly boot because of hard disk (bad blocks) failures. As I said earlier TMPFS is also used on almost any distribution for the /dev/ filesystem which is kept in memory.
You can see which tmpfs partitions is used on your Linux server with:
debian-server:~# mount |grep -i tmpfs tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
Above is an output from a standard Debian Linux server. On CentOS 7 standard mounted tmpfs are as follows:
[root@centos ~]# mount |grep -i tmpfs devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=1016332k,nr_inodes=254083,mode=755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel) tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755) tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,seclabel,mode=755)
The /run tmpfs mounted directory is also to be seen also on latest Ubuntus and Fedoras and is actually the good old /var/run (where applications keep there pids and some small app related files) stored in tmpfs filesystem stored in memory.
If you're wondering what is /dev/shm and why it appears mounted on every single Linux Server / Desktop you've ever used this is a special filesystem shared memory which various running programs (processes) can use to transfer data quick and efficient between each other to preven the slow disk swapping. People using Linux for the rest 15 years should remember /dev/shm has been a target of a lot of kernel exploits as historically it had a lot of security issues.
While writting this article I've just checked about KNOPPIX developed amd just for info as of time of writting this distro has already 1000+ programs on CD version and 2600+ packages / application on DVD version. Nowadays Knoppixis mostly used mostly as USB Live Flash drive as a lot of people are dropping CD / DVD use (many servers doesn't have a CD / DVD Drive) and for USB Live Flash Linux distros tmpfs is also key technology used as this gives the end user an amazing fast experience (Desktop applications run much fasten on Live USBs when tmpfs is used than when the slow 7200 RPM HDDs are used).
Loading big parts of the distribution within RAM (with tmpfs from Linux Kernel 2.4+ onwards) is also heavily used by a lot of Cluster vendors in most of Clustered (Cloud) Linux based environemnts, cause TMPFS gives often speeds up improvements to x30 times and decreases greatly I/O HDD. FreeBSD users will be happy to know that TMPFS is already ported and could be used on from FreeBSD 7.0+ onward.
In this small article I will give you example use on how I use tmpfs to speed up our WordPress Websites which use WP Caching plugins such as W3 Total Cache and WP Super Cache and Hyper Cache / WP Super Cache disk caching and MySQL server as a Database backend. Below example is wordpress specific but since it can be easily applied to Joomla, Drupal or any other CMS out there that uses mySQL server to make a lot of CPU expensive memory hungry(LEFT JOIN) queries which end up using a slow 7200 RPM hard disk.
1. Preparing tmpfs partitions for WordPress File Cache directory
If you want to give tmpfs a test drive, I recommend you try to create / mount a 20 Megabyte partition. To create a tmpfs partition you don't need to use a tool like mkfs.ext3 / mkfs.ext4 as TMPFS is in reality a virtual filesystem that is mapped in the server system physical RAM (volatile memory). TMPFS is very nice because if you run out of free RAM system starts a combination of RAM use + some Hard disk SWAP The great thing about TMPFS is it never uses all of the available RAM and SWAP, which would not halt your server if TMPFS partition gets filled, but instead you will start getting the usual "Insufficient Disk Space", just like with a physical HDD parititon. RAMFS cares much less about server compared to TMPFS, because if RAMFS is historically older.
ramfsfile systems cannot be limited in size like a disk base file system which is limited by it’s capacity, thus ramfswill continue using memory storage until the system runs out of RAM and likely crashes or becomes unresponsive. This is a problem if the application writing to the file system cannot be limited in total size, so in my opinion you better stay away from RAMFS except you have a good idea what you're doing. Another disadvantage of RAMFS compared to TMPFS is you cannot see the size of the file system in df and it can only be estimated by looking at the cached entry in free.
Note that before proceeding to use TMPFS or RAMFS you should know besides having advantages, there are certain serious disadvantage that if the server using tmpfs (in RAM) to store files crashes the customer might loose his data, therefore using RAM filesystems on Production servers is best to be used just for caching folders which are regularly synchronized with (rsync) to some folder to assure no data will be lost on server reboot or crash.
Memory of fast storage areas are ideally suited for applications which need repetitively small data areas for caching or using as temporary space such as Jira (Issue and Proejct Tracking Software) Indexing As the data is lost when the machine reboots the tmpfsstored data must not be data of high importance as even scheduling backups cannot guarantee that all the data will be replicated in the even of a system crash.
To test mounting a tmpfs virtual (memory stored) filesystem issue:
mount -t tmpfs tmpfs -o size=256m /mnt/tmpfs
If you want to test mount a ramfs instead:
mount -t ramfs -o size=256m ramfs /mnt/ramfs
debian-server:~# mount |grep -i -E "ramfs|tmpfs" tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) tmpfs on /mnt/tmpfs type tmpfs (rw,size=256m) ramfs on /mnt/ramfs type tmpfs (rw,size=256m)
Once mounted tmpfs can be used in the same way as any ext4 / reiserfs filesystem. In the same way to make mounts permanent, its necessery to add a line to /etc/fstab
To illustrate better a tmpfs use case on my blog running WordPress with W3TotalCache (W3TC) plugin cache folder in /var/www/blog/wp-content/w3tc to get advantage of tmpfs to store w3tc files.
a) Stop Apache
debian-server:~# /etc/init.d/apache stop
[root@centos ~]# /etc/init.d/httpd stop
b) Move w3tc dir to w3tc-bak
debian-server:~# cd /var/www/blog/wp-content/ debian-server:~# mv w3tc w3tc-bak
You might also want to add the nr_inodes (option) to tmpfs while mounting. nr_inodes is the maximum inode for instance. Default is half the number of your physical RAM pages, (on a machine with highmem) the number of lowmem RAM page, some common option that should work is nr_inodes=5k, if you're unsure what this option does you can safely skip it 🙂
e) Mount new added tmpfs folder
Then to mount the newly added filesystem issue:
Or if you're on a CentOS / RHEL server use httpd Apache user instead and whenever you have docroot and wordpress installed.
[root@centos ~]# chown -R apache:apache: w3tc
If you're using Apache SuPHP use whatever the UID / GID is proper.
On CentOS you will need to set proper UID and GID (UserID / GroupID), to find out which ones to to use check in /etc/passwd:
As I said earlier the biggest problem with caching (the reason why many hosting providers) and site admins refuse to use it is they might loose some data, to prevent data loss or at least mitigate the data loss to few minutes intervals it is a good idea to synchronize tmpfs kept folders somewhere to disk with rsync.
2. Preparing tmpfs partitions for MySQL server temp File Cache directory
Its common that MySQL servers had to serve a lot of long and heavy SQL JOIN Queries mostly by related posts WP plugins such as (Zemanta Related Posts) and Contextual Related posts though MySQLs are well optimized to work as much as efficient using mysql tuner (tuning primer) still often SQL servers get a lot of temp tables created to disk (about 25% to 30%) of all SQL queries use somehow HDD to serve queries and as this is very slow and there is file lock created the overall MySQL performance becomes sluggish at times to fix (resolve) that without playing with SQL code to optimize the slow queries the best way I found is by using TMPFS as MySQL temp folder.
To do so I create a TMPFS usually the size of 256 MB because this is usually enough for us, but other hosting companies might want to add bigger virtual temp disk:
debian-server:~# mount|grep -i tmpfs tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) tmpfs on /var/www/blog/wp-content/w3tc type tmpfs (rw,noexec,nosuid,size=2g,uid=33,gid=33,mode=1755) tmpfs on /var/mysqltmp type tmpfs (rw,gid=108,uid=111,size=256M,nr_inodes=10k,mode=0700)
c) Add new path to tmpfs created folder in my.cnf
Then edit /etc/mysql/my.cnf
debian-server:~# vim /etc/mysql/my.cnf
[mysqld] # # * Basic Settings # user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /var/mysqltmp
On CentOS edit and change tmpdir in same way within /etc/my.cnf
d) Finally Restart Apache and MySQL to make mysql start using new set tmpfs memory kept folder
Now monitor your server and check your pagespeed increase for me such an optimization usually improves site performance so site becomes +50% faster, to see the difference you can test your website before applying tmpfs caching for site and after that by using Google PageInsight (PageSpeed) Online Test. Though this example is for MySQL and WordPress you can easily adopt the same for Joomla if you have Joomla Caching enabled to some folder, same goes for any other CMS such as Drupal that can take use of Disk Caching. Actually its a small secret of many Hosting providers that allow clients to create sites via CPanel and Kloxo this tmpfs optimizations are already used for sites and by this the provider is able to offer better website service on lower prices. VPS hosting providers also use heavy caching. A lot of people are using TMPFS also to accelerate Sites that have enabled Google Pagespeed as Cacher and accelerator, as PageSpeed module puts a heavy HDD I/O load that can easily stone the server. Many admins also choose to use TMPFS for /tmp, /var/run, and /var/lock directories as this leads often to significant overall server services operations improvement. Once you have tmpfs enabled, It is a good idea to periodically monitor your SWAP used space with (df -h), because if you allocate bigger tmpfs partitions than your physical memory and tmpfs's full size starts to be used your machine will start swapping heavily and this could have a very negative performance affect.
☩ Walking in Light with Christ – Faith, Computing, Diary 2006-2020 Powered by: Pc Freak Solutions and Comments (RSS). Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.