I have mysql/php script running on my linux machine. Its basically migrating files content to MySql table. there are about 4400,000 Files, Account files each file`s content is places in a table in one row. It have been 14 hours and so far it have only done 300,000 Accounts. At first it was very fast and was doing about 1000
Tag: performance
Windows C Runtime toupper slow when locale set
I’m diagnosing an edge case in a cross platform (Windows and Linux) application where toupper is substantially slower on Windows. I’m assuming this is the same for tolower as well. Originally I tested this with a simple C program on each without locale information set or even including the header file and there was very little performance difference. Test was
__rdtscp calibration unstable under Linux on Intel Xeon X5550
I’m trying to use __rdtscp intrinsinc function to measure time intervals. Target platform is Linux x64, CPU Intel Xeon X5550. Although constant_tsc flag is set for this processor, calibrating __rdtscp gives very different results: As we can see the difference between program executions can be up to 3 times (125-360). Such instability is not appropriate for any measurements. Here is
Why malloc is faster than static memory allocation in my test program?
I have a test program. I get this result when executing it in ubuntu trusty 64 bit. malloc time:9571 static time:45587 Why malloc is faster than static memory allocation,or my test program is wrong? The test program is like this. Answer That benchmark is essentially meaningless because most of what it is measuring has little relationship with the use of
diagnosing when I’m being limited by disk i/o
I’m running Python 2.7 on a Linux machine, and by far the slowest part of my script is loading a large json file from disk (a SSD) using the ujson library. When I check top during this loading process, my cpu usage is basically at 100%, leading me to believe that I’m being bottlenecked by parsing the json rather than
What is the fastest way to increase the size of a file in linux on a ext4 filesystem from a C executable without creating holes in the file?
The fastest way to increase the file size that I know of would be to ftruncate() or lseek() to the desired size and write a single byte. That doesn’t fit my needs in this case because the resulting hole in the file doesn’t reserve space in the file system. Is the best alternative to use calloc() and write()? Perhaps this
Any equivalent function to pthread_getcpuclockid since i have tid of Thread
To get perf statistics of parallel running threads – To get list of threads I use thread list in /proc/self/task Now I want to get ID of a thread’s CPU time clock. But clock_getcpuclockid only works with PIDs. pthread_getcpuclockid requires the pthread id of thread and I did not find any way to get pthread id from TId of thread
Using Cgroups to limit cpu usage
I am trying to use cgroups in order to limit the CPU usage. I am using this guide https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-cpu_and_memory-use_case.html My /etc/cgconfig.conf file is the following My cgrules.conf is the following Althouth when I try to run: I see that the cpu usage in 100% for the users belong to group wheel and test1 I have checked the services with service
How much does using htaccess files slow down website performance (especially with solid state disks)?
The Apache docs say (http://httpd.apache.org/docs/2.4/howto/htaccess.html), “You should avoid using .htaccess files completely if you have access to httpd main server config file. Using .htaccess files slows down your Apache http server. Any directive that you can include in a .htaccess file is better set in a Directory block, as it will have the same effect with better performance.” But that
How to see the sum of all context switches of all threads within a Java process?
I am running pidstat on CentOS linux to monitor a Java application. When I feed the java pid to pidstat it never shows any context switches. I have to find the pid of a specific Java thread (using top -H) to see the context switches. How can you see the sum of all context switches of all threads within a