Shantanu Oak
Jul. 7th, 2009
08:26 pm - Google's Context-Sensitive Spell Checker
Wikipedia includes as an example: "Their coming too sea if its reel", a phrase that has 5 spelling mistakes, even though all the words can be found in the dictionary. If you enter this text in Gmail's editor and click on "Check spelling", Gmail won't find any error. Type the same text in Google's search box, and you'll get a "did you mean" message that suggests to search for "Their coming to see if its real". As you can see, Google's search box has a better spell checker than Gmail since it doesn't rely on a dictionary, it uses a huge amount of searches to determine what are the most probable sequences of words that follow a certain pattern. Unfortunately, the spell checker available at Google.com is optimized for searches, which are usually short, so you can't use it to spell check an email message or a blog post.
http://googlesystem.blogspot.com/2009/0
Jun. 13th, 2009
05:07 pm - SQLite Triggers
Assuming that customer records are stored in the "customers" table, and that order records are stored in the "orders" table, the following trigger ensures that all associated orders are redirected when a customer changes his or her address:
CREATE TRIGGER update_customer_address UPDATE OF address ON customers
BEGIN
UPDATE orders SET address = new.address WHERE customer_name = old.name;
END;
With this trigger installed, executing the statement:
UPDATE customers SET address = '1 Main St.' WHERE name = 'Jack Jones';
causes the following to be automatically executed:
UPDATE orders SET address = '1 Main St.' WHERE customer_name = 'Jack Jones';
04:54 pm - SQLite Example file
Here is an example how does SQLite handle datetime function:
create table events (id INTEGER PRIMARY KEY AUTOINCREMENT, name, kind, start, end);
insert into events values (null, 'tom', 'hour', datetime('now', '+1 day','start of day', '+11 hours'), datetime('now', '+1 day','start of day', '+12 hours'));
insert into events values (null, 'tom', 'hour', datetime('now', '+1 day','start of day', '+9 hours'), datetime('now', '+1 day','start of day', '+10 hours'));
insert into events values (null, 'joe', 'hour', datetime('now', '+1 day','start of day', '+9 hours'), datetime('now', '+1 day','start of day', '+10 hours'));
insert into events values (null, 'tom', 'day', datetime('now', '+1 day','start of day'), datetime('now', '+1 day','start of day', '+1 day'));
select *, (strftime('%s', end) - strftime('%s', start)) as length from events;
select *, min((strftime('%s', end) - strftime('%s', start))) as length from events where datetime('now', '+1 day','start of day', '+9 hours','+30 minutes') and end > datetime('now', '+1 day','start of day', '+9 hours','+30 minutes') group by name;
Jun. 4th, 2009
11:14 am - Some Important Bookmarks:
Need to check the following links before investing :)
Alerts:
https://secure.icicidirect.com/cust
Demat Balance:
https://secure.icicidirect.com/trad
SectorWise:
https://secure.icicidirect.com/Trad
NetWorth:
https://secure.icicidirect.com/Trad
Research:
http://content.icicidirect.com/rese
Margin Positions:
https://secure.icicidirect.com/trad
May. 6th, 2009
07:19 pm - Star trains Between Mumbai and Pune
Mumbai to Pune
Hyderabad Express 7031 12:45PM 4:30PM (Dadar, Kalyan, Karjat, Lonavala, Pune Junction) Rs. 415, 300, 121
Chennai Special 0163 12:45PM 3:25PM NON STOP Rs. 415, 300, 121 Only on Tuesday
Konark Express 1019 3:10PM 7:00PM (Dadar, Kalyan, Karjat, Lonavala, Pune Junction) Rs. 415, 300, 121
Kanyakumari Express 6381 3:45PM 7:15PM (Dadar, Kalyan, Karjat, Lonavala, Pune Junction) Rs. 415, 300, 121
Pragati Express 2125 4:25PM 7:53PM (Dadar, Karjat, Lonavala, ShivajiNagar) Rs. 250, 71
Deccan Queen Express 2123 5:10 PM 8:25PM (Karjat, Lonavala, ShivajiNagar) Rs. 250, 71
Pune to Mumbai
* Deccan Queen Express 2124 7:15AM 10:30AM (Lonavala, Dadar) Rs. 250, 71
* Pragati Express 2126 7:50AM 11:10AM (Lonavala, Dadar) Rs. 250, 71
Chennai Dadar Superfast Express 0164 8:10PM 10:55PM NON STOP Rs. 415, 300, 121 Only Thursday
Mumbai express 7032 9:10AM 1:05PM (Lonavala, Karjat, Kalyan, Dadar) Rs. 250, 71
Mumbai Express 1042 9:35AM 1:45PM (Khadi, Lonavala, Kalyan, Thane, Dadar) Rs. 415, 300, 121
Hyderabad Dadar Special 0732 11:35AM 3:30PM (Lonavala, Kalyan) Rs. 415, 300, 121 Only Sunday and Monday
Udyan Express 6530 3:50PM 7:50PM (Lonvala, Kalyan, Dadar) Rs. 415, 300, 121
Nagarcoil Mumbai Express 6352 4:40PM 8:50PM (Lonavala, Kalyan, Thane, Dadar) Rs. 415, 300, 121 Monday and Friday
Mumbai Express 6340 4:40PM 8:50PM (Lonavala, Kalyan, Thane, Dadar) Rs. 415, 300, 121 Tuesday, Web, Thu, Sat
Mumbai Express 6332 4:40PM 8:50PM (Lonavala, Kalyan, Thane, Dadar) Rs. 415, 300, 121 sunday
* Intercity Express 2128 5:55PM 9:00PM (Lonavala, Thane, Dadar) Rs. 250, 71
* Indrayani Express 1022 6:35PM 9:55PM (Lonavala, Karjat, Kalyan, Thane, Dadar) Rs. 250, 71
Apr. 22nd, 2009
02:48 pm - decrease the shutdown time
One way to decrease the shutdown time is to pre-flush the dirty pages, like this:
mysql> set global innodb_max_dirty_pages_pct = 0;
Now run the following command:
$ mysqladmin ext -i10 | grep dirty
| Innodb_buffer_pool_pages_dirty | 1823484 |
| Innodb_buffer_pool_pages_dirty | 1821293 |
| Innodb_buffer_pool_pages_dirty | 1818938 |
And wait until it approaches zero. (If the server is being actively used, it won't get to zero.)
Once it's pretty low, you can perform the shutdown and there'll be a lot less unfinished work to do, so the server should shut down more quickly.
Apr. 13th, 2009
12:54 pm - PEAR Power
Basic commands:
pear search services
(search for packages those have services keyword in it)
pear list
(installed packages)
pear upgrade-all
(upgrade installed packages)
pear install --alldeps Service_Weather
_____
Useful Packages
Mail
(send mail with attachments)
upload/ download file after tar or zip
(file management made easy)
pager
(Paging result rows)
DB
(Database connection)
HTML_safe
(Find unclosed tags)
HTML_QuickForm
(Build forms dynamically)
HTML_Menu
(Build menus dynamically)
Numbers_words
(numbers to word like One hundred fifty)
Date
(all about comparing dates, finding diff)
PhpDocumentor
(code documentation on the fly)
Log
(Logging messages from code)
Config
(have a single file for all configurations)
Auth
(Login / password management)
Apr. 8th, 2009
09:52 am - Tips time
Here are the things I have recently learned...
_____
Success code start with 2xx
OK 200
Accepted 202
No Response 204
Created 201
partial 203
Error code start with 4xx and 5xx
Bad Request 400
Unauthorized 401
Payment Requested 402
Forbidden 403
Not Found 404
Internal Error 500
Not Implemented 501
Service temporarily overloaded 502
Gateway Timeout 503
Moved 301
Found 302
Modified 303
Not Modified 304
_____
When you are using Ext3 filesystem you are limiting yourself to 16GB single file size. And you can have 32000 directories/ files. The number is double in case of Ext4 filesystem.
_____
The fullform of ISCSI is Internet Small Computer Storage Interface
_____
There is a live cd called Damn Vulnerable Linux that is very unstable and open for intrusions.
There is also xp.iso that acts like Windows live cd.
_____
nikto, ettercap, nessus, wireshark and nmap are the two utilities for network security.
Some useful commands:
nmap -sS -o 10.10.10.0/24
/etc/init.d/nessusd start
equery files nessus
_____
In order to transfer a file to windows start listening on windows box
nc -lvp 4444 -e cmd.exe
and connect from Linux box
nc -v 192.168.240.128 4444
Mar. 5th, 2009
11:05 am - extracting rar files in linux
# wget http://www.rarlab.com/rar/rarlinux-3.6.0.t
--12:01:13-- http://www.rarlab.com/rar/rarlinux-3.6.0.t
Resolving www.rarlab.com... 217.70.129.242
Connecting to www.rarlab.com|217.70.129.242|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 752997 (735K) [application/x-gzip]
Saving to: `rarlinux-3.6.0.tar.gz'
100%[=======>] 752,997 27.3K/s in 29s
12:01:45 (25.6 KB/s) - `rarlinux-3.6.0.tar.gz' saved [752997/752997]
# tar -zxvf rarlinux-3.6.0.tar.gz
rar/
rar/file_id.diz
rar/license.txt
rar/Makefile
rar/order.htm
rar/rarfiles.lst
rar/rar.txt
rar/readme.txt
rar/technote.txt
rar/whatsnew.txt
rar/rar
rar/rar_static
rar/unrar
rar/default.sfx
# cd rar
# cp rar unrar /bin
Nov. 20th, 2008
02:38 pm - Remove junk in Linux
Sometimes you'll end up with carriage returns on each line in a file originally created on a DOS/Windows system, or filenames with spaces, tab, or other control characters in them, but you can't see them typically.
The cat command provides three useful options -v, -e, and -t that will let you understand these invisible characters
-v (displays non-printing characters)
-e (prints a "$" at the end of each line to indicate a NL character)
-t (prints "^I" for each Tab in the file)
cat -vet filename |more
Oct. 12th, 2008
06:01 pm - Analyse mysql config using MySQLTuner
[root@localhost Desktop]# cd /root/
[root@localhost ~]# wget mysqltuner.pl/mysqltuner.pl
--17:58:59-- http://mysqltuner.pl/mysqltuner.pl
Resolving mysqltuner.pl... 209.20.89.226
Connecting to mysqltuner.pl|209.20.89.226|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 38063 (37K) [text/plain]
Saving to: `mysqltuner.pl'
100%[===================================
17:59:01 (36.2 KB/s) - `mysqltuner.pl' saved [38063/38063]
[root@localhost ~]# ./mysqltuner.pl
bash: ./mysqltuner.pl: Permission denied
[root@localhost ~]# chmod +x mysqltuner.pl
[root@localhost ~]# ./mysqltuner.pl
>> MySQLTuner 0.9.9 - Major Hayden <major@mhtx.net>
>> Bug reports, feature requests, and downloads at http://mysqltuner.com/
>> Run with '--help' for additional options and output filtering
[!!] Successfully authenticated with no password - SECURITY RISK!
-------- General Statistics ----------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.0.44sp1-enterprise-gpl-log
[OK] Operating on 32-bit architecture with less than 2GB RAM
-------- Storage Engine Statistics ----------------------------------------
[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 250M (Tables: 35)
[--] Data in InnoDB tables: 145M (Tables: 29)
[--] Data in ARCHIVE tables: 95M (Tables: 3)
[!!] Total fragmented tables: 2
-------- Performance Metrics ----------------------------------------
[--] Up for: 14h 27m 20s (569 q [0.011 qps], 18 conn, TX: 63K, RX: 9K)
[--] Reads / Writes: 100% / 0%
[--] Total buffers: 1.0G global + 23.1M per thread (400 max threads)
[!!] Allocating > 2GB RAM on 32-bit systems can cause system instability
[!!] Maximum possible memory usage: 10.1G (1179% of installed RAM)
[OK] Slow queries: 0% (0/569)
[OK] Highest usage of available connections: 0% (1/400)
[OK] Key buffer size / total MyISAM indexes: 1.0G/130.9M
[!!] Key buffer hit rate: 66.7% (6 cached / 2 reads)
[!!] Query cache is disabled
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 1 sorts)
[OK] Temporary tables created on disk: 17% (15 on disk / 88 total)
[OK] Thread cache hit rate: 94% (1 created / 18 connections)
[OK] Table cache hit rate: 92% (86 open / 93 opened)
[OK] Open file limit used: 5% (112/2K)
[OK] Table locks acquired immediately: 100% (25 immediate / 25 locks)
[!!] Connections aborted: 16%
[!!] InnoDB data size / buffer pool: 145.4M/8.0M
-------- Recommendations ----------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Your applications are not closing MySQL connections properly
Variables to adjust:
*** MySQL's maximum memory usage exceeds your installed memory ***
*** Add more RAM before increasing any MySQL buffer variables ***
query_cache_size (>= 8M)
innodb_buffer_pool_size (>= 145M)
Oct. 2nd, 2008
05:57 pm - Sorting in Linux
[root@localhost ~]# cat testme.txt
this is a test
food that are killing you
wings of fire
we hope that the labor spent in creating this software
this is a test
unix ips as well as enjoy our blog
[root@localhost ~]# awk '!x[$0]++' testme.txt
this is a test
food that are killing you
wings of fire
we hope that the labor spent in creating this software
unix ips as well as enjoy our blog
[root@localhost ~]# sort -u testme.txt
food that are killing you
this is a test
unix ips as well as enjoy our blog
we hope that the labor spent in creating this software
wings of fire
[root@localhost ~]# sort testme.txt | uniq -u
food that are killing you
unix ips as well as enjoy our blog
we hope that the labor spent in creating this software
wings of fire
Aug. 26th, 2008
09:48 am - Digital Content and ICT
Someone asked me this question:
What is your Vision of Digital content for Development and how do you think ICT (Information Communication Technology) tools can be used towards this end at large?
Ans:
Digital content is very crucial for any development, let it be economic, social, educational or personal. There are 2 points to note though, a) The digitization method should not be proprietary, it should be free, open source. b) It should be available to the public at an affordable rates. Let's see an example of this. If I want to know more about a medicine or a disease like malaria, what were my options in the good old days?
a) Go to Public / private library and become a member by paying fees and filling lengthy forms.
b) Take help of the Librarian to find the section/ book on the subject.
c) If the book is available (and not already taken by some other knowledge seeker), stand in a queue to register it in my name so that I can take it home.
d) Remember to return the book in 7 days, or else be prepared to pay hefty fine.
Fast Forward: today, I can read wikipedia entry on malaria on my mobile!
In the very old days, the only way to seek the knowledge was through human interaction. The one who "have" knowledge was called "Guru". Most of the gurus took utmost care not to digitize the knowledge in any form so that they can keep their supremacy and bad guys won't get hold of it.
As the technology is progressing, it can play an important role of eliminating the supremacy of "Gurus" and "Paper". In a truly ICT driven digitalized world one can live happily with minimum interaction with these two supreme powers. Paper / books will still be important for the people who are not part of digital revolution due to ignorance, poverty or stigma.
May. 14th, 2008
11:20 am - Usability 3.0
This is about Nirav Mehta's post on usability found here...
http://www.mehtanirav.com/2008/04/17/im
and the comment by Naveen, found here...
http://www.creanology.org/2008/04/usabi
I do not agree with either of these great men, Nirav and Naveen.
1) I will like to remove the "No, I'm a new user" link. When I want to login, I simply want to type in my username and password and hit enter! When I want to register, I look for big "Register" or "Sign Up" button with mouseover effect. As you can see, 'Sign Up' and 'Sign In' links are there at the top! Therefore it would be best to remove the 'sign up' option from 'Sign in' page.
2) I do not like the idea of using E-mail address as login. I want to use 'username' as login credential and NOT an e-mail that may change.
3) I will like the username, password input boxes integrated somewhere on the home page, instead of having a separate page for it. If space is an issue, create a mouseover/ onclick drop down box for 'Sign In' link at the top right.
You have to understand how the new users come to site, interact and judge/trust site. The users like me register with several sites before settling down with one or two really useful sites those I will like to use often. So all I look for is a quick way to login or register. The best would have been integrating with facebook or drupal or open ID so that there is no need to login at all or atleast I can use the same username and password evreywhere!
Mar. 5th, 2008
07:54 pm - Wishful Thinking
An old man lived alone in a small village . He wanted to spade his potato garden, but it was very hard work. His only son, who would have helped him, was in prison. The old man wrote a letter to his son and mentioned his situation:
Dear Son,
"I am feeling pretty bad because it looks like I won't be able to plant my potato garden this year. I hate to miss doing the garden, because your mother always loved planting time. I'm just getting too old to be digging up a garden plot. If you were here, all my troubles would be over. I know you would dig the plot for me, if you weren't in prison.
.........................Love, Dad"
Shortly, the old man received this telegram: "For Heaven's sake, Dad, don't dig up the garden!! That's where I buried the GUNS!!"
the next morning, a dozen CBI agents and local police officers showed up and dug up the entire garden without finding any guns.
Confused, the old man wrote another note to his son telling him what happened, and asked him what to do.
His son's reply was: "Go ahead and plant your potatoes,
Dad............ It's the best I could do for you from here."
Moral:
NO MATTER WHERE YOU ARE IN THE WORLD, IF YOU HAVE DECIDED TO DO SOMETHING DEEP FROM YOUR HEART, YOU CAN DO IT. IT IS THE THOUGHT THAT MATTERS NOT WHERE YOU ARE OR WHERE THE PERSON IS.
Feb. 12th, 2008
03:59 pm - Python and Bash
Now in this file (myfirstscript.sh), enter the following line.
#!/usr/bin/bash
ls -l
sleep 2
who
sleep 2
w
Nothing spectacular here. But note that 'sleep' is an internal bash command which is used to pause the execution process for certain time in seconds. Next fire up a console (xterm, gnome-terminal ...) and set the executable bit for the script myfirstscript.sh as follows :
$ chmod u+x myfirstscript.sh
This lets you execute the script by its name as follows :
$ ./myfirstscript.sh
All this may seem easy. But you can get added benefits if you substitute 'bash' with Python language to write your scripts. If you do not know Python language and is looking for some direction then you should look at the two books Core Python programming and Python phrasebook which will give you a head start in mastering this powerful but easy to learn language.
http://linuxhelp.blogspot.com/2008/02/p
Nov. 23rd, 2007
08:22 pm - What is a Stop Loss order ?
A Stop loss order allows the client to place an order which gets activated only when the market price of the relevant security reaches or crosses a threshold price specified by the investor in the form of 'Stop Loss Trigger Price'. When a stop loss trigger price (SLTP) is specified in a limit order, the order becomes one which is conditional on the market price of the stock crossing the specified SLTP. The order remains passive (i.e. not eligible for execution) till the condition is satisfied. Once the last traded price of the stock reaches or surpasses the SLTP, the order becomes activated (i.e. eligible for execution by being taken up in the matching process of the exchange) and then on behaves like a normal limit order. It is used as a tool to limit the maximum loss on a position.
Examples :
Stop Loss Buy Order
'A' short sells Reliance shares at Rs 325 in expectation that the price will fall. However, in the event the price rises above his buy price 'A' would like to limit his losses. 'A' may place a limit buy order specifying a Stop loss trigger price of Rs 345 and a limit price of Rs 350. The stop loss trigger price (SLTP) has to be between the last traded price and the buy limit price. Once the market price of Reliance breaches the SLTP i.e. Rs 345, the order gets converted to a limit buy order at Rs 350.
Stop Loss Sell Order
'A' buys Reliance at Rs 325 in expectation that the price will rise. However, in the event the price falls, 'A' would like to limit his his losses. 'A' may place a limit sell order specifying a Stop loss trigger price of Rs 305 and a limit price of Rs 300. The stop loss trigger price has to be between the limit price and the last traded price at the time of placing the stop loss order. Once the last traded price touches or crosses Rs. 305, the order gets converted into a limit sell order at Rs. 300.
Important
Please note that in a buy order the SLTP cannot be less than the last traded price. This is treated as a normal order because the condition that the last traded price should exceed the stop loss trigger price for a buy order is already satisfied. Similary, in case of a stop loss sell order the SLTP should not be greater than the last traded price for the same reason.
Oct. 31st, 2007
05:43 pm - Price for 'premium' text messages?
Sean Clark pays extra each month for his cell phone service so his daughter Amanda can enjoy unlimited, no-charge text messaging. So the Bothell, Wash. man was stunned when his Sprint bill for September showed with nearly $10,000 in text message charges.
http://redtape.msnbc.com/2007/10/sean-c
Oct. 7th, 2007
07:12 pm - Usability? What's that?
I was trying the new service launched by microsoft called healthvault.
The concept sounded interesting so I tried to log in using my Live login account at...
http://www.healthvault.com/
The next screen asked me to change my password. I didn't want to change it so I typed the same password as my new password. The next screen looked like a dead end!
I completely failed to understand the following message.
Windows Live ID
Microsoft HealthVault uses Windows Live ID to authenticate your identity. If you have a Live ID with a “weak” password, you will be asked to create a “strong” password.
I want to login to healthvault to save my blood group and blood pressure count. I do NOT want a "strong" password. I PURPOSELY keep all the passwords as "weak" since I am not going to store any confidential and true info anywhere on the site that I still don't trust. Isn't it logical? Microsoft seems to have employed double graduates and Maths wizards who decide the best algorithm on my behalf to check if my password is strong enough? Let the user go to the page that he wishes to visit. A simple usability rule has been completely ignored. I will not be visting the site again even to test it!
http://www.flickr.com/photos/shantanuo/1
Sep. 24th, 2007
11:26 am - Backup from binlog and other tips
We had an unscheduled test of our backups last night. Point-in-time recovery using a mysqldump and binary log files worked fine (thank goodness).
Last night we had some user-generated data corruption on a production server. The database was relatively small (a few Gig), so, after stopping the database and restarting it with ––skip-networking, I imported it from the latest daily mysqldump. Although I didn’t use ––master-data for the mysqldump (we had some locking issues with that in the past) I knew the time that the mysqldump had been started.
I did a little investigation into the binary log files using mysqlbinlog
mysqlbinlog ––start-datetime=”2007-09-17 11:25:00? ––stop-datetime=”2007-09-17 11:30:00? binlog.000003 > my_tempfile
and found out the exact time I wanted to start rolling forward from. (I already knew when to stop rolling forward.) Then I ran it
mysql -p our_database < mysqlbinlog ––start-datetime=”2007-09-17 11:26:00 ––stop-datetime=”2007-09-17 20:45:00?
Checked things out, shut down mysql and restarted it normally, and we were once again off and running.
(Luckily for us, in this case I didn’t need to know an exact or down-to-the-second time to start rolling forward from. Activity was very light around the time of the mysqldump. Also, luckily, we didn’t need a starttime more precise than to-the-second. If we had needed to be more precise, I think I would have needed a mysqldump taken with the ––master-data option.)
http://oracle2mysql.wordpress.com/2
If you’re new to MySQL, you might not know that in the default configuration ‘a’='A’. Ie, string comparisons are by default case-insensitive. If this is a surprise to you, read up on Chapter 9 of the online manual, on character sets and collations.
The default character set is latin1 and the default collation is latin1_swedish_ci (’ci’ stands for ‘case-insensitive). If you don’t want ‘a’ to equal ‘A’, you can change this by setting the variables ‘character-set-server’ and ‘collation-server’ in your config file or your startup options. For example, we want to support unicode, so we use character-set-server=’utf8? in our config file. We also added the following (in the [mysqld] section) so that clients will use the right character set and collation, too: init_connect=’set names utf8; set collation_connection=utf8_bin’.
http://oracle2mysql.wordpress.com/2
MySQL is not so heavily-instrumented as Oracle. (Back to tuning using ratios rather than the wait interface… sigh…) But it does offer (among other tools) the slow query log. Turn it on (put ‘log_slow_queries‘ in your config file), and all queries that take longer than long_query_time seconds (also set in your config file) will be logged to a slow query log file, along with the time they took to execute. Then you can use mysqldumpslow to analyze the output. You can see, for example, which slow queries are taking the most cumulative time on your server, or are being executed most frequently. (The manual doesn’t say much about it, and mysqldumpslow ––help doesn’t give too much help, but I think mysqldumpslow -s t and mysqldumpslow -s c do that.)
If you use InnoDB, though (as we do), be aware that the “lock time” logged in the slow query log only counts time for table-level locks that are taken at the MySQL top level, not InnoDB locks taken at the storage-engine level. (The logging is done at the “top” level.) So the “lock time” in the log is pretty useless for you. (You can use innodb_lock_monitor for that, but that’s another story…)
http://oracle2mysql.wordpress.com/2
Improve Performance of MySQL
If you get a Too many connections error when you try to connect to the mysqld server, this means that all available connections are in use by other clients.
The number of connections allowed is controlled by the max_connections system variable. Its default value is 100. If you need to support more connections, you should restart mysqld with a larger value for this variable.
Add the following line under [mysqld]
max_connections=250
http://kb.mediatemple.net/article.php?i
The following two commands will let you know if query cache is being used or not.
SHOW STATUS LIKE '%qcache%';
SHOW VARIABLES LIKE "query%';
To enable query cache you have to add the following two lines in /etc/my.cnf
query-cache-type = 1
query-cache-size = 20M
http://www.databasejournal.com/feat
Memcached is probably the most popular distributed caching system and it works great. I should write an article comparing performance of various caching systems some time.
http://www.danga.com/memcached/
Navigate: (Previous 20 Entries)
