How to optimize a function by maximizing 1 variable and minimizing another? Problem

I want to implement an optimization algorithm for my file transfer program.

The program buffers data in a local file before uploading to central server periodically and it compresses the files before transferring.

I would want the program to intelligently predict the time and size thresholds before transferring.

The objective function could be defined as following 

f(u) = theta1*u + (theta2*u)/b + theta3

where 


u is the size of data
b is the network bandwidth (bps) 
f(u) is the time taken to transfer u bytes of data.
theta1*u refers to amount of time taken to compress u bytes of data
theta2*u*b refers to time taken to transfer compressed data. 
theta3 is constant protocol overhead


I want to be able to optimize the transfer by minimizing time and maximizing uncompressed size.
If I were to simply minimize f(u) that would have been easy but then in this particular case , I would also want to maximize amount of data to be transferred.
The idea is to be able to come up with a machine learning algorithm which can change as per different network scenarios and fluctuating bandwidth , rather than user providing it at start of program.

Of course, I would implement it with some sane seed values and keep them within sane boundaries.

Solution space

Given the nature of this problem , which class of algorithms should I be looking into? Would gradient descent be the right way to approach this? is it possible to apply maximize and minimization on same function of 2 different variables? Am I over-thinking this ?
You can't.  The optimal solution is not well-defined.  In general there will be a range of tradeoffs between minimizing time and uncompressed size, and you haven't specified anything that would allow uniquely identifying which you want.

Your first step is that you need to specify a single objective function, where the goal is to find a solution that maximizes the objective function.  Then you can try applying standard methods from mathematical optimization, e.g., gradient descent, Newton's method, and so on.