Performance tests on tmpfs an application server involves many I/O operations on temporary files. colleagues suggest placing files on tmpfs to reduce disk I/O, so I tested the performance comparison between tmpfs and disk I/O on my development machine. The difference is indeed great: Test the write performance of tmpfs: 17: 06 [root @ add... performance tests on tmpfs an application server involves many I/O operations on temporary files. colleagues suggest placing files on tmpfs to reduce disk I/O, so I tested the performance comparison between tmpfs and disk I/O on my development machine, which is indeed quite different: Test the write performance of tmpfs: [root @ addev] $ time dd if =/dev/zero of =/dev/shm/test bs = 8 k count = 300000 dd: writing '/dev/shm/test': No space left on device 246069 + 0 records in 246068 + 0 records out 2015789056 bytes (2.0 GB) copied, 1.73075 seconds, 1.2 GB/s real 0m1. 732 s user 0m0. 018 s sys 0m1. 714 s to test the read performance of tmpfs: [root @ addev] $ time dd if =/dev/shm/test of =/dev/null bs = 8 k 246068 + 0 records in 246068 + 0 records out 2015789056 bytes (2.0 GB) copied, 1.28952 seconds, 1.6 GB/s real 0m1. 291 s user 0m0. 018 s sys 0m0. 820 s test file system write performance: [root @ addev] $ time dd if =/dev/zero of =/opt/test bs = 8 k count = 300000 300000 300000 + 0 records in 2457600000 + 0 records out bytes (2.5 GB) copied, 8.574 seconds, 287 MB/s real 0m8. 582 s user 0m0. 053 s sys 0m4. s to test the read performance of the file system: [root @ addev] $ time dd if =/opt/test of =/dev/null bs = 8 k 300000 + 0 records in 300000 + 0 records out 2457600000 bytes (2.5 GB) copied, 19.5491 seconds, 126 MB/s real 0m19. 550 s user 0m0. 064 s sys 0m1. note the following when using tmpfs to store files for 809 s: after the server is restarted, data in tmpfs will be lost. tmpfs will use memory and swap to store data, therefore, pay attention to the memory usage and swap usage.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service