How to control ajax calls without effecting memory of server?

An AJAX request to your server is no different to any other PHP request the server might handle, e.g. the frontend.

Browser requests have a time and memory limit configured at the server level, WordPress itself is not responsible for setting or enforcing those limits.

Say if am importing something big using ajax how can perform that without effecting the server with a memory limit of 250MB?

You have the following options:

  1. Use less memory
  2. Don’t process the entire import in a single request
  3. Break your import file into smaller chunks that get processed separately
  4. Do the processing elsewhere, e.g. a CLI task. PHP running from a CLI command has no upper limit on time or memory except the amount of physical memory installed on the server.

Otherwise, you can’t do stuff for free, there is always a cost. Browser requests are not suited to long running expensive/heavy tasks.