This paper presents, using queuing theory and optimization techniques, an approach for estimating the optimal capacities and speeds of the memory levels in a memory hierarchy operating in the multiprogrammed environment. Optimality is defined with respect to mean system response time under a fixed cost constraint. It is assumed that the number of levels in the hierarchy as well as the capacity of the lowest level are known. The effect of the storage management strategy is characterized by the miss ratio function which, together with the device technology cost functions, is assumed to be representable by power functions. It is shown that as the arrival rate of processes and/or the number of active processes in the system increase, the optimal solution deviates considerably from that under a uniprogrammed environment. It is also shown that the solution obtained is the global optimum.