I have a system with 4 gigs of RAM and an SSD. I heard allocating swap on SSD is a bad idea because SSD has got limited write cycle.
So when I see < 100 MiB of pages is written to the swap, and I have some available space on the RAM, I just use an alias 'rswap' to turn it off and on again:
alias rswap='sudo swapoff /dev/sda3 && sudo swapon /dev/sda3'
Now this moves the pages back to RAM, and the swap gets down to 0 bytes. The RAM usage increases, but I never had a problem with applications so far.
Also, there are several reasons why the swap is used despite having available RAM. One of them is this one!
Is it a good idea to run the aliased command