Showing posts with label IMAP. Show all posts
Showing posts with label IMAP. Show all posts

Thursday, September 13, 2007

What is gam server ? How to stop?

It is a known bug in RHEL.
It hogs all the processors and some time claims 99% of CPU time. This type of behavior is mainly contributed to screen saver. As We are run our server in INIT 3 level,so screen saver is not the culprit in our case.
Gam_server is the running instance name of “gemin” which is by default loaded with RHEL.Its the successor of FAM (File Alteration Module).FAM (or gam_server) is used to decrease CPU cycle by effectively implementing Locking/Unlocking file handles. When used with IMAP , it is claimed that it will ease shared folder implementation.
In our scenario,huge number of gam_servers(sometimes > 350) were running and virtually doing nothing.At the same time, these processes use to fire mails to root which could not be delivered thus giving unnecessary load to Postfix(these mails were lying in Q and postfix tries to resend Q’ed mails after certain intervals)Courier-IMAP has been compiled with FAM module so it was the part and parcel of it. We have not implemented shared folders so I toggled two parameters of imapd.Two parameters IMAP_USELOCKS and IMAP_ENHANCEDIDLE are used to implement shared folders.If you not interested in shared folders(Some webmail client like squirrelmail lets you to implement shared folder ) you can disable these two parameters.

IMAP_USELOCKS=0

IMAP_ENHANCEDIDLE=0

Changed (toggled parameter) is written in RED BOLD. Both these parameters are used in conjunction with Shared Folder Implementation.

After restarting imapd,no gam_server will be spawned.