I discovered that on my Ubuntu 22 server, attempting to write to a file, often induces around 20ms delay, even when only writing a few bytes. Here is some basic code that demonstrates the problem: And here is the output: It seems more likely to happen if there is a bit of delay between attempts, and also more likely to
I’m preparing for more traffic in the days to come, and I want to be sure server can handle it. Running sar -q, the load of “3.5” doesn’t seem much on 32 CPU architecture: However, I’m not sure about the memory. Running sar -r shows 98.5% for the %memused and only 13.60 for %commit: running htop seems OK too: 14.9G/126G.
In GNU/Linux I have an issue with an application I have made. It works in my development environment, most of the components running in dockers or natively, but it randomly (often, but not always) fails in the server environment where it needs to be deployed. Infrastructure: Both servers seem to have enough resources -4 CPUs, 4 GB RAM. The machine
To print the contents of a file one can use getc: How efficient is the getc function? That is, how frequently does it actually do operating system calls or something that would take a non-trivial amount of time? For example, let’s say I had a 10TB file — would calling this function trillions of times be a poor way to
I have a log file consisting of a list of epoch 19-digit timestamps, for example I would like to iterate through this list, and compare the previous timestamp to the current timestamp in the list and echo a message if x duration of inactivity as occurred, ex: What would be the most efficient method to iterate through the list such
I made a tmpfs filesystem in my home directory on Ubuntu using this command: Then I wrote this Python program: The result: I am confused about this result. Isn’t the tmpfs a file system based on RAM and isn’t RAM supposed to be notably faster than any hard disk, including SSDs? Furthermore, I noticed that this program is using over
We are using t2.large as instance type and php v 7.2 Magento2 multi-store is taking 25 seconds to load The product page is extremely slow We are Bitnami cloud image of Magento Does the server location affects the performance ?? Do I have to use a Load balancer?? I am using a built-in cache for Magento and flat category The
I have a Cmake OpenCV project. If I execute the same project under Windows in the debug configuration is the performance very bad and I place zero breakpoints. In the release modus, I get the same performance as on Linux. Why is the performance better on Linux than on Windows? Can I fix the performance issue on window? I use
I’m trying to find the string containing the substring in a text file by starting at the end. The file has tens of millions of lines. (The requirement is to read from End of the File. I cannot use sed/awk/grep etc) The below program does the job but it takes a long time. How can I make it run faster?
I have quad core ubuntu system. say If I see the load average as 60 in last 15 mins during peak time. Load average goes to 150 as well. This loads happens generally only during peak time. Basically I want to know if there is any standard formula to derive the number of cores ideally required to handle the given