Does ulimit change the limits of running programs? Are their specific resources which can not be changed at run time? If ulimit doesn't change limits at run time, does this mean that you have to restart all daemons to work with the new specified limits?
You can limit the resources for a daemon by using ulimit (or limit, depending on the shell), or you can set them using
/etc/login.conf (hence the user account per daemon type).
/etc/login.conf make sure you follow the steps at the top of the file to regenerate the db version of the file. Then restart the daemon, assuming that the daemon changes user account.