Create a minimum of 10 GB of free space (yes really) - a simple google search will confirm this (in fact many suggest a minimum of 15% of your hard drive be kept free) - one link is here - http://www.thexlab.com/faqs/lackofram.html
The best solution may be to get an external hard drive and move the iPhoto (and possibley iTunes) library to it -
Moving the iPhoto library is safe and simple - quit iPhoto and drag the iPhoto library intact as a single entity to the external drive - depress the option key and launch iPhoto using the "select library" option to point to the new location on the external drive - fully test it and then trash the old library on the internal drive (test one more time prior to emptying the trash)
And be sure that the External drive is formatted Mac OS extended (journaled) (iPhoto does not work with drives with other formats) and that it is always available prior to launching iPhoto
And backup soon and often - having your iPhoto library on an external drive is not a backup and if you are using Time Machine you need to check and be sure that TM is backing up your external drive
LN