Intel provides a set of new instructions that allows an application to be executed in a protected region called as enclave. However, the overheads associated with their execution are significant. The Intel SGX's documentation does not provide enough insights about the performance of Intel SGX. We analyze the performance of the Intel SGX using the perf tool by creating few micro-benchmarks that perform the critical operations of Intel SGX such as ecall/ocall. We provide a model that shows the factors affecting the performance of the Intel SGX. Furthermore, we reduce the performance overheads of Intel SGX for OS intensive workloads by providing a flexible scheduler(SecSched) that schedules the user and the kernel threads on separate cores based on the cache footprint. We observe that our scheme SecSched is 18.1% better in performance compared to the recent competing scheme HotCalls.