Forum Replies Created

  • leades

    Member
    March 22, 2022 at 12:00 am in reply to: Strange ktn behaviour between gcc(64 bit) and clang(32 bit)

    Hello,

    Reverting back with feedback:

    Are you looking at an uninitialized value, prior to the ktn call vs after it? It has been checked in both gcc and clang, for 64 bit and 32 bit but it was not reproduced. If you still have a question about this, could you please post your code and session in full.

    Many Thanks

    Luke

  • leades

    Member
    February 24, 2022 at 12:00 am in reply to: questions about tuning a NUMA server

    Hello,

    You could try “numactl –cpubind=0 –membind=0,1 <command to start the q process>”. Let me know if this works.

    Many Thanks

    Luke

  • leades

    Member
    February 18, 2022 at 12:00 am in reply to: questions about tuning a NUMA server

    Hello,

    Reverting back with feedback for some of the questions:

    Q1) Keeping the process within one node is the best option for performance. However, if the working set exceeds one node’s memory capacity, it then has to spill in to other nodes.

    Q2) No, this rarely helps with recent kernels. This discussion will be removed altogether from code.kx.com. The default for modern systems is 0, which should be fine. (Regardless, this setting has no effect if confining the process to a single node)

    Q3) No, the default NUMA policy attempts to allocate from the current node, and from others if no free memory is available. See https://man7.org/linux/man-pages/man2/set_mempolicy.2.html for more details.

    Q4) You would usually express that as “numactl -N 0 -m 0” (allocate from node 0, and also run on the cores that belong to node 0)

    I hope this information helps.

    Many Thanks

    Luke

  • leades

    Member
    February 14, 2022 at 12:00 am in reply to: K Fundamental Capstone Project

    Hello,

    I would say it is the sum of all the trades but you can try both to see which works.

    Many Thanks

    Luke

  • leades

    Member
    February 11, 2022 at 12:00 am in reply to: K Fundamental Capstone Project

    Hello,

    The edge15 table that you created earlier has 4 columns; time, edge, qty, numTrds. What this question is asking, is that you create a dictionary which takes the edge, qty, numTrds columns from the edge15 table. So your result should be a dictionary with 3 elements, with each value being the list of aggregated numbers from the edge15 table. I hope this clarification helps.

    Many Thanks

    Luke

  • leades

    Member
    January 11, 2022 at 12:00 am in reply to: example kdb+ udp multicast protobuf

    Hello,

    There is no native support for UDP sockets in q, so you need to create a socket in C and then bind that to q. Once you have a socket, you can then serialize the data using .protobufkdb.serializeArray, with the data, to get a byte buffer. That byte buffer can then be sent on the UDP socket either as uni or multicast.

    Many Thanks

    Luke

  • leades

    Member
    December 29, 2021 at 12:00 am in reply to: What did -11!log do underlying

    Hello,

    Returning with some feedback; the -11! command itself is not consuming large amounts of memory. It simply reads each line of the log file and applies ‘value’ to it. So the memory will be consumed by what happens when value is applied. It’s usually something simple like an insert or update to a table but it can be more complex leading to more memory usage.

    Secondly, you can set garbage collection to immediate by using

    system”g 1″

    It is to an extent automatic but it doesn’t have the full effect as the manually invoked .Q.gc[]. Here is some documentation with more information; https://code.kx.com/q/basics/syscmds/#g-garbage-collection-mode and https://code.kx.com/q4m3/13_Commands_and_System_Variables/#13110-garbage-collection-g.

    I hope this helps.

    Many Thanks

    Luke

  • leades

    Member
    December 29, 2021 at 12:00 am in reply to: What did -11!log do underlying

    Hello,

    Great questions for the Community! Here is some more documentation about replaying log files that might be useful, https://code.kx.com/q/kb/replay-log/. I have reached out internally for a more detailed response.

    Many Thanks

    Luke